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

Consider outermost const-anon in non_local_def lint #131498

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Oct 10, 2024

This PR change the logic for finding the parent of the impl definition in the non_local_definitions lint to consider multiple level of const-anon items, instead of only one currently.

I also took the opportunity to cleanup the related code.

cc @traviscross
Fixes #131474

@rustbot
Copy link
Collaborator

rustbot commented Oct 10, 2024

r? @lcnr

rustbot has assigned @lcnr.
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 Oct 10, 2024
@Urgau
Copy link
Member Author

Urgau commented Oct 10, 2024

It is to be noted that #131474 has not yet been considered by T-lang, we should probably hold of merging until that is done, however I expect this fix to be uncontroversial.

In the mean time it can be reviewed.

@rustbot label +S-blocked

@rustbot rustbot added the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Oct 10, 2024
@Urgau Urgau added the L-non_local_definitions Lint: non_local_definitions label Oct 10, 2024
@rust-log-analyzer

This comment has been minimized.

@traviscross
Copy link
Contributor

@rustbot label -S-blocked

This is OK to go forward in a lang sense. Based on what we earlier decided and why we decided it, it's clear this is the right thing to do, and this is of course a two-way door.

@rustbot rustbot removed the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Oct 10, 2024
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

r=me after lang stuff 🤷

@Urgau
Copy link
Member Author

Urgau commented Oct 11, 2024

Addressed the review comments, CI passes and

This is OK to go forward in a lang sense.

therefore, @bors r=@lcnr rollup

@bors
Copy link
Contributor

bors commented Oct 11, 2024

📌 Commit 7e05da8 has been approved by lcnr

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 Oct 11, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 11, 2024
Consider outermost const-anon in `non_local_def` lint

This PR change the logic for finding the parent of the `impl` definition in the `non_local_definitions` lint to consider multiple level of const-anon items, instead of only one currently.

I also took the opportunity to cleanup the related code.

cc `@traviscross`
Fixes rust-lang#131474
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 11, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#131464 (Update wasm-component-ld to 0.5.10)
 - rust-lang#131498 (Consider outermost const-anon in `non_local_def` lint)
 - rust-lang#131512 (Fixing rustDoc for LayoutError.)
 - rust-lang#131529 (rustdoc-json-types: fix typo in comment)
 - rust-lang#131531 (move dummy commit logic into x86_64-gnu-llvm-18)

Failed merges:

 - rust-lang#131476 (coverage: Include the highest counter ID seen in `.cov-map` dumps)

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

Rollup of 6 pull requests

Successful merges:

 - rust-lang#131464 (Update wasm-component-ld to 0.5.10)
 - rust-lang#131476 (coverage: Include the highest counter ID seen in `.cov-map` dumps)
 - rust-lang#131497 (Add myself to bootstrap review rotation)
 - rust-lang#131498 (Consider outermost const-anon in `non_local_def` lint)
 - rust-lang#131512 (Fixing rustDoc for LayoutError.)
 - rust-lang#131529 (rustdoc-json-types: fix typo in comment)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e00f49d into rust-lang:master Oct 11, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 11, 2024
Rollup merge of rust-lang#131498 - Urgau:transparent-const-anons, r=lcnr

Consider outermost const-anon in `non_local_def` lint

This PR change the logic for finding the parent of the `impl` definition in the `non_local_definitions` lint to consider multiple level of const-anon items, instead of only one currently.

I also took the opportunity to cleanup the related code.

cc ``@traviscross``
Fixes rust-lang#131474
@tgross35
Copy link
Contributor

@bors r- still in the queue

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 11, 2024
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-non_local_definitions Lint: non_local_definitions S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

non_local_definitions lint is unhappy with multiple nested anonymous constants
7 participants