The error message main.rs written with Deepseek does not have a red or yellow warning

Compiling eframe v0.22.0
error[E0432]: unresolved import winapi::um::winuser
--> D:\asd.cargo\registry\src\index.crates.io-6f17d22bba15001f\eframe-0.22.0\src\native\app_icon.rs:74:9
|
74 | use winapi::um::winuser;
| ^^^^^^^^^^^^^^^^^^^ no winuser in um
|
note: found an item that was configured out
--> D:\asd.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\mod.rs:290:37
|
290 | #[cfg(feature = "winuser")] pub mod winuser;
| ^^^^^^^
note: the item is gated behind the winuser feature
--> D:\asd.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\mod.rs:290:7
|
290 | #[cfg(feature = "winuser")] pub mod winuser;
| ^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: could not find windef in shared
--> D:\asd.cargo\registry\src\index.crates.io-6f17d22bba15001f\eframe-0.22.0\src\native\app_icon.rs:95:26
|
95 | ) -> winapi::shared::windef::HICON {
| ^^^^^^ could not find windef in shared
|
note: found an item that was configured out
--> D:\asd.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\shared\mod.rs:81:36
note: the item is gated behind the windef feature
--> D:\asd.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\shared\mod.rs:81:7

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432.
error: could not compile eframe (lib) due to 2 previous errors

Welcome! Please format your code snippets and compiler errors as described here so we can read them easily:

That being said, it appaears that the import you are trying to use is gated behind the winuser feature. You can learn more about cargo features here: Features - The Cargo Book

1 Like