Skip to content

Prefer individual unexpected_cfgs allow over global one - #638

Closed
Urgau wants to merge 2 commits into
dimforge:masterfrom
Urgau:check-cfg
Closed

Prefer individual unexpected_cfgs allow over global one#638
Urgau wants to merge 2 commits into
dimforge:masterfrom
Urgau:check-cfg

Conversation

@Urgau

@Urgau Urgau commented May 27, 2024

Copy link
Copy Markdown

This PR replace the global #![allow(unexpected_cfgs)] over individual ones in crates/*, so that the main library still gets the benefits of the lint.

This PR also remove obsolete asmjs cfg, since that target was removed some time ago from Rust.

@ThierryBerger ThierryBerger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks fine to me ; it's a pity we're losing the comment for context on the lint though

For the asmjs target drop, more context here: rust-lang/rust#117338

@ThierryBerger ThierryBerger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After playing a bit with it, I'm not sure if this makes sense to keep unexpected_cfgs = "allow" at all ?

@sebcrozet

Copy link
Copy Markdown
Member

@Urgau Thank you for this PR! What is the benefit of allowing the lint in individual Cargo.toml (8 times) instead of lib.rs (only 2 times)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants