You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.74.1 (a28077b28 2023-12-04)`
error[E0433]: failed to resolve: could not find `Advice` in `memmap2`
--> src\main.rs:83:30
|
83 | mmap.advise(memmap2::Advice::HugePage).unwrap();
| ^^^^^^ could not find `Advice` in `memmap2`
error[E0599]: no method named `advise` found for struct `memmap2::Mmap` in the current scope
--> src\main.rs:83:14
|
83 | mmap.advise(memmap2::Advice::HugePage).unwrap();
| ^^^^^^ method not found in `Mmap`
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `parser` (bin "parser") due to 2 previous errors
The text was updated successfully, but these errors were encountered:
The problem is that this functionality is not available on Windows but only Unix-like systems, hence the compiler cannot find it.
If you are working on a cross-platform project and you want to optionally use this code on Unix-like systems, you could use conditional compilation via the #[cfg(unix)] attribute to include it only where the functionality is available.
I'm trying to build a rust project on Windows 11 but it yields an error.
I've never built anything before in rust so I don't know what I should troubleshoot.
cargo version:
cargo 1.74.1 (ecb9851af 2023-10-18)
The text was updated successfully, but these errors were encountered: