Since this will likely affect a lot of projects, my guess is the change will eventually be reverted or made less strict (e.g. skipped for repr(C)/repr(transparent) types). So for now I think the best solution is to silence that warning for the nightly jobs.
Per https://doc.rust-lang.org/rustc/lints/levels.html, it should be possible to override the warning by appending -A dead-code. However, I tested RUSTFLAGS="-D warnings -A dead-code" cargo +nightly build -p uefi locally and still see all the same warnings. So for now I'll put up a PR that just sets an empty RUSTFLAGS for the nightly jobs (instead of our usual default of -D warnings.
https://github.com/rust-osdev/uefi-rs/pull/1206 is up with the temporary fix. I'll keep this bug open until the lint issue is properly resolved, either with rustc changes or uefi-rs changes.
See https://github.com/rust-osdev/uefi-rs/actions/runs/9508727436/job/26210548798 for example:
I believe this is the same issue as https://github.com/rust-lang/rust/issues/126169.
Since this will likely affect a lot of projects, my guess is the change will eventually be reverted or made less strict (e.g. skipped for
repr(C)
/repr(transparent)
types). So for now I think the best solution is to silence that warning for the nightly jobs.Per https://doc.rust-lang.org/rustc/lints/levels.html, it should be possible to override the warning by appending
-A dead-code
. However, I testedRUSTFLAGS="-D warnings -A dead-code" cargo +nightly build -p uefi
locally and still see all the same warnings. So for now I'll put up a PR that just sets an empty RUSTFLAGS for the nightly jobs (instead of our usual default of-D warnings
.