Skip to content

Commit

Permalink
fuck: your rust compiler updates suck
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed May 5, 2024
1 parent 4a045b9 commit 66980be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![no_std]
#![allow(static_mut_refs)]
#![allow(static_mut_refs, unexpected_cfgs)]

pub use ch32_metapac as pac;

Expand Down

1 comment on commit 66980be

@Urgau
Copy link

@Urgau Urgau commented on 66980be May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up, with the release of rust-lang/cargo#13913 (in nightly-2024-05-19). Cargo has now gain the ability to declare --check-cfg args directly inside the [lints] table with [lints.rust.unexpected_cfgs.check-cfg]1:

Cargo.toml:

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(foo)'] }

Note that the diagnostic output of the lint has been updated to suggest the [lints] approach first. You can use it to guide you through the --check-cfg arguments that may need to be added.

Footnotes

  1. take effect on Rust 1.80 (current nightly), is ignored on Rust 1.79 (current beta), and produce an unused warning below

Please sign in to comment.