We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The latest Rust nightly compiler raises a new warning about dead code.
D:\git\windows-rs> cargo check -p windows --features Foundation warning: struct `IReference` is never constructed --> crates\libs\windows\src\Windows\Foundation\mod.rs:1024:12 | 1024 | pub struct IReference<T>(windows_core::IUnknown, core::marker::PhantomData<T>) | ^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: struct `IReferenceArray` is never constructed --> crates\libs\windows\src\Windows\Foundation\mod.rs:1281:12 | 1281 | pub struct IReferenceArray<T>(windows_core::IUnknown, core::marker::PhantomData<T>) | ^^^^^^^^^^^^^^^ warning: `windows` (lib) generated 2 warnings Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
This seems like a Rust nightly bug. I don't see what's wrong with this code.
Originally noticed here: https://github.com/microsoft/windows-rs/actions/runs/9501067497/job/26185702630
The text was updated successfully, but these errors were encountered:
Debug
You can for example use IReference as follows (from another crate):
IReference
use windows::{core::*, Foundation::*}; fn main() -> Result<()> { let r: IReference<i32> = PropertyValue::CreateInt32(123)?.cast()?; assert_eq!(r.Value()?, 123); Ok(()) }
I may just allow dead_code to unblock other work until this is resolved in the Rust compiler.
dead_code
Sorry, something went wrong.
This seems to be similar to rust-lang/rust#126169
unused
Successfully merging a pull request may close this issue.
The latest Rust nightly compiler raises a new warning about dead code.
This seems like a Rust nightly bug. I don't see what's wrong with this code.
Originally noticed here: https://github.com/microsoft/windows-rs/actions/runs/9501067497/job/26185702630
The text was updated successfully, but these errors were encountered: