Closed
Description
Beginning with nightly-2024-11-20 (today), compiling a simple program like this:
#[ctor::ctor]
fn init() {}
produces a warning like this:
warning: unexpected `cfg` condition value: `used_linker`
--> src/lib.rs:1:1
|
1 | #[ctor::ctor]
| ^^^^^^^^^^^^^
|
= note: no expected values for `feature`
= help: consider adding `used_linker` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
= note: this warning originates in the attribute macro `ctor::ctor` (in Nightly builds, run with -Z macro-backtrace for more info)
This appears to be the relevant rustc change: rust-lang/rust#132577
My best guess is that these lines are the cause:
Lines 180 to 181 in fc9cd68
Adding used_linker
as a feature to the project makes the warning go away, but I suspect this is not the intent.
Metadata
Metadata
Assignees
Labels
No labels