Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report the unexpected_cfgs lint in external macros #132577

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Nov 3, 2024

This PR marks the unexpected_cfgs lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes #132572

try-job: aarch64-gnu-debug

@rustbot
Copy link
Collaborator

rustbot commented Nov 3, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 3, 2024
@rust-log-analyzer

This comment has been minimized.

@jieyouxu jieyouxu added the L-unexpected_cfgs Lint: unexpected_cfgs label Nov 4, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@Urgau
Copy link
Member Author

Urgau commented Nov 4, 2024

The job x86_64-gnu-tools failed!

Fixed in rust-cli/anstyle#229 (thks to @epage)

Let's try again!

@rust-log-analyzer

This comment has been minimized.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 5, 2024

Would this need a crater run?

@Urgau
Copy link
Member Author

Urgau commented Nov 5, 2024

Would this need a crater run?

Evaluating the new unexpected_cfgs warnings coming from external macros on a crater run is doable (although not easy), but I'm not sure what it will give us, a part (obviously) from the number of impacted crates, which I'm not sure how to interpret. A big (or even small) number of warnings would IMO only reinforce the usefulness of enabling the reporting in external macros (not that it needs it to be clear).

Is there something particular you are looking for?

@jieyouxu
Copy link
Member

jieyouxu commented Nov 6, 2024

No I'm more just curious, because maybe a few crates are affected.

@Urgau
Copy link
Member Author

Urgau commented Nov 8, 2024

r? @petrochenkov

@rustbot rustbot assigned petrochenkov and unassigned wesleywiser Nov 8, 2024
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 9, 2024

📌 Commit 37e67ac has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 9, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 9, 2024
…o, r=petrochenkov

Report the `unexpected_cfgs` lint in external macros

This PR marks the `unexpected_cfgs` lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes rust-lang#132572
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 9, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#131258 (Stabilize s390x inline assembly)
 - rust-lang#132577 (Report the `unexpected_cfgs` lint in external macros)
 - rust-lang#132801 (interpret: get_alloc_info: also return mutability)
 - rust-lang#132825 (Exclude relnotes-tracking-issue from needs-triage)

r? `@ghost`
`@rustbot` modify labels: rollup
@workingjubilee
Copy link
Member

workingjubilee commented Nov 10, 2024

@bors r-
Seems to have failed in #132827 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 10, 2024
@workingjubilee
Copy link
Member

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 10, 2024
… r=<try>

Report the `unexpected_cfgs` lint in external macros

This PR marks the `unexpected_cfgs` lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes rust-lang#132572

try-job: aarch64-gnu-debug
@bors
Copy link
Contributor

bors commented Nov 10, 2024

⌛ Trying commit 37e67ac with merge 6606d0e...

@rust-log-analyzer

This comment has been minimized.

@Urgau Urgau force-pushed the check-cfg-report-extern-macro branch from 5ae1373 to 79c8e64 Compare November 18, 2024 18:04
@Urgau
Copy link
Member Author

Urgau commented Nov 18, 2024

The fix has landed, let's try again.

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Nov 18, 2024

📌 Commit 79c8e64 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 18, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 18, 2024
…o, r=petrochenkov

Report the `unexpected_cfgs` lint in external macros

This PR marks the `unexpected_cfgs` lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes rust-lang#132572

try-job: aarch64-gnu-debug
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2024
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#132577 (Report the `unexpected_cfgs` lint in external macros)
 - rust-lang#132758 (Improve `{BTreeMap,HashMap}::get_key_value` docs.)
 - rust-lang#133180 ([rustdoc] Fix items with generics not having their jump to def link generated)
 - rust-lang#133181 (Update books)
 - rust-lang#133182 (const_panic: inline in bootstrap builds to avoid f16/f128 crashes)
 - rust-lang#133187 (Add reference annotations for diagnostic attributes)

r? `@ghost`
`@rustbot` modify labels: rollup
@fmease
Copy link
Member

fmease commented Nov 19, 2024

Failed in rollup: #133189 (comment)
@bors rollup=iffy r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 19, 2024
@fmease
Copy link
Member

fmease commented Nov 19, 2024

I misjudged: #133189 (comment)

@bors rollup- r=petrochenkov

@bors
Copy link
Contributor

bors commented Nov 19, 2024

📌 Commit 79c8e64 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#131081 (Use `ConstArgKind::Path` for all single-segment paths, not just params under `min_generic_const_args`)
 - rust-lang#132577 (Report the `unexpected_cfgs` lint in external macros)
 - rust-lang#133023 (Merge `-Zhir-stats` into `-Zinput-stats`)
 - rust-lang#133200 (ignore an occasionally-failing test in Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#131081 (Use `ConstArgKind::Path` for all single-segment paths, not just params under `min_generic_const_args`)
 - rust-lang#132577 (Report the `unexpected_cfgs` lint in external macros)
 - rust-lang#133023 (Merge `-Zhir-stats` into `-Zinput-stats`)
 - rust-lang#133200 (ignore an occasionally-failing test in Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4720054 into rust-lang:master Nov 19, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2024
Rollup merge of rust-lang#132577 - Urgau:check-cfg-report-extern-macro, r=petrochenkov

Report the `unexpected_cfgs` lint in external macros

This PR marks the `unexpected_cfgs` lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes rust-lang#132572

try-job: aarch64-gnu-debug
smoelius added a commit to rust-fuzz/afl.rs that referenced this pull request Nov 20, 2024
This recent change is causing CI to fail: rust-lang/rust#132577

The failure is caused by the `used_linker` feature in code produced by
the `ctor::ctor` attribute macro.
github-merge-queue bot pushed a commit to rust-fuzz/afl.rs that referenced this pull request Nov 20, 2024
This recent change is causing CI to fail: rust-lang/rust#132577

The failure is caused by the `used_linker` feature in code produced by
the `ctor::ctor` attribute macro.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-unexpected_cfgs Lint: unexpected_cfgs relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent warning for macros that contain unexpected_cfgs
10 participants