moves rustc_legacy_const_generics checks into attribute parsing - #163787
rust-bors[bot] merged 3 commits into
Conversation
|
Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
|
r? @tiif rustbot has assigned @tiif. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
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. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
r? me |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
23bccf6 to
2d0258e
Compare
This comment has been minimized.
This comment has been minimized.
| return; | ||
| } | ||
| let Some(item) = cx.target_item else { return }; | ||
| let ItemKind::Fn(function) = &item.kind else { return }; |
There was a problem hiding this comment.
This should be unreachable can we panic here?
| // Invalid targets are already diagnosed by target checking. | ||
| return; | ||
| } | ||
| let Some(item) = cx.target_item else { return }; |
There was a problem hiding this comment.
Same here
|
@rustbot ready |
…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.
…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)
…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.
…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)
…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)
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.
Part of #153101.
Moves the remaining
#[rustc_legacy_const_generics]validation fromrustc_passes::check_attrintoRustcLegacyConstGenericsParser::finalize_check.The three associated diagnostics are moved into
rustc_attr_parsing, and the old check is removed fromcheck_attr.rs.Diagnostic messages and spans are preserved.