Skip to content

moves rustc_legacy_const_generics checks into attribute parsing - #163787

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
ssenthilnathan3:move-legacy-const-generics-check
Oct 5, 2026
Merged

rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
ssenthilnathan3:move-legacy-const-generics-check

Conversation

@ssenthilnathan3

@ssenthilnathan3 ssenthilnathan3 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Part of #153101.

Moves the remaining #[rustc_legacy_const_generics] validation from rustc_passes::check_attr into RustcLegacyConstGenericsParser::finalize_check.

The three associated diagnostics are moved into rustc_attr_parsing, and the old check is removed from check_attr.rs.

Diagnostic messages and spans are preserved.

@rustbot

rustbot commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 5, 2026
@rustbot

rustbot commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

r? @tiif

rustbot has assigned @tiif.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 17 candidates

@rustbot

rustbot commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 5, 2026
@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer

Copy link
Copy Markdown
Member

r? me

@rustbot rustbot assigned JonathanBrouwer and unassigned tiif Oct 5, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@rustbot author

@rustbot

rustbot commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@ssenthilnathan3
ssenthilnathan3 force-pushed the move-legacy-const-generics-check branch from 23bccf6 to 2d0258e Compare October 5, 2026 07:09
@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 5, 2026
@rust-log-analyzer

This comment has been minimized.

return;
}
let Some(item) = cx.target_item else { return };
let ItemKind::Fn(function) = &item.kind else { return };

@JonathanBrouwer JonathanBrouwer Oct 5, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be unreachable can we panic here?

View changes since the review

// Invalid targets are already diagnosed by target checking.
return;
}
let Some(item) = cx.target_item else { return };

@JonathanBrouwer JonathanBrouwer Oct 5, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2026
@ssenthilnathan3

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 5, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 5, 2026

@JonathanBrouwer JonathanBrouwer left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rust-bors

rust-bors Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f998e4a has been tentatively approved by JonathanBrouwer

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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 5, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 5, 2026
…generics-check, r=JonathanBrouwer

moves rustc_legacy_const_generics checks into attribute parsing

Part of rust-lang#153101.

Moves the remaining `#[rustc_legacy_const_generics]` validation from `rustc_passes::check_attr` into `RustcLegacyConstGenericsParser::finalize_check`.

The three associated diagnostics are moved into `rustc_attr_parsing`, and the old check is removed from `check_attr.rs`.

Diagnostic messages and spans are preserved.
rust-bors Bot pushed a commit that referenced this pull request Oct 5, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #163531 (rustc_ast_lowering: track implicit Self via explicit flag instead of name)
 - #163785 (Bump Windows CI LLVM to 22.1.8)
 - #163646 (Get `inputs_hir` directly from `decl`)
 - #163733 (Fix extra spaces in integer format_into docs)
 - #163787 (moves rustc_legacy_const_generics checks into attribute parsing)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 5, 2026
…generics-check, r=JonathanBrouwer

moves rustc_legacy_const_generics checks into attribute parsing

Part of rust-lang#153101.

Moves the remaining `#[rustc_legacy_const_generics]` validation from `rustc_passes::check_attr` into `RustcLegacyConstGenericsParser::finalize_check`.

The three associated diagnostics are moved into `rustc_attr_parsing`, and the old check is removed from `check_attr.rs`.

Diagnostic messages and spans are preserved.
rust-bors Bot pushed a commit that referenced this pull request Oct 5, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #163531 (rustc_ast_lowering: track implicit Self via explicit flag instead of name)
 - #160915 ([rustdoc] Fix how `Deref` items is handled.)
 - #163364 (make semicolon_in_expressions_from_non_local_macros not report-in-deps)
 - #163770 (document the rustc_comptime attribute)
 - #163780 (Skip optional asserts in SsaRangePropagation)
 - #163785 (Bump Windows CI LLVM to 22.1.8)
 - #163796 (continue crashes tests `-Znext-solver` work)
 - #163646 (Get `inputs_hir` directly from `decl`)
 - #163733 (Fix extra spaces in integer format_into docs)
 - #163773 (Update GitHub Actions to v26)
 - #163787 (moves rustc_legacy_const_generics checks into attribute parsing)
 - #163810 (Fix an issue for clippy's `search_is_some` with the next-solver)
rust-bors Bot pushed a commit that referenced this pull request Oct 5, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #163364 (make semicolon_in_expressions_from_non_local_macros not report-in-deps)
 - #163531 (rustc_ast_lowering: track implicit Self via explicit flag instead of name)
 - #163770 (document the rustc_comptime attribute)
 - #163780 (Skip optional asserts in SsaRangePropagation)
 - #163785 (Bump Windows CI LLVM to 22.1.8)
 - #163796 (continue crashes tests `-Znext-solver` work)
 - #163646 (Get `inputs_hir` directly from `decl`)
 - #163733 (Fix extra spaces in integer format_into docs)
 - #163773 (Update GitHub Actions to v26)
 - #163787 (moves rustc_legacy_const_generics checks into attribute parsing)
 - #163810 (Fix an issue for clippy's `search_is_some` with the next-solver)
@rust-bors
rust-bors Bot merged commit 9deb169 into rust-lang:main Oct 5, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 5, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 5, 2026
Rollup merge of #163787 - ssenthilnathan3:move-legacy-const-generics-check, r=JonathanBrouwer

moves rustc_legacy_const_generics checks into attribute parsing

Part of #153101.

Moves the remaining `#[rustc_legacy_const_generics]` validation from `rustc_passes::check_attr` into `RustcLegacyConstGenericsParser::finalize_check`.

The three associated diagnostics are moved into `rustc_attr_parsing`, and the old check is removed from `check_attr.rs`.

Diagnostic messages and spans are preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.

5 participants