Description
See https://github.com/rust-osdev/uefi-rs/actions/runs/9508727436/job/26210548798 for example:
error: struct `GraphicsOutput` is never constructed
--> uefi/src/proto/console/gop.rs:74:12
|
74 | pub struct GraphicsOutput(GraphicsOutputProtocol);
| ^^^^^^^^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
[... many more warnings like this...]
I believe this is the same issue as rust-lang/rust#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 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
.