Skip to content

Post-attribute ports cleanup pt. 1#154808

Open
JonathanBrouwer wants to merge 8 commits intorust-lang:mainfrom
JonathanBrouwer:attr_cleanup
Open

Post-attribute ports cleanup pt. 1#154808
JonathanBrouwer wants to merge 8 commits intorust-lang:mainfrom
JonathanBrouwer:attr_cleanup

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented Apr 4, 2026

View all comments

r? @jdonszelmann

This cleans up some checks I could find were for non-parsed attributes, and works towards removing BUILTIN_ATTRIBUTES

All commits do one thing and every commit passes tests, so best reviewed commit by commit

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 4, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

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

cc @jdonszelmann

@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 Apr 4, 2026
@Bryntet
Copy link
Copy Markdown
Contributor

Bryntet commented Apr 4, 2026

Let's gooo!!!!

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

Just in case, not expecting any impact
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 4, 2026
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 4, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try cancel
@bors try

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 4, 2026

Try build cancelled. Cancelled workflows:

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 4, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 4, 2026

☀️ Try build successful (CI)
Build commit: 80c2a26 (80c2a26a6a19dacecb6e324e40dbaf1af1307e6c, parent: e0e95a71872dfe9e15d22bddea9ac45c85ddda1a)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (80c2a26): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 1.3%, secondary 0.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
3.0% [1.8%, 4.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.2%, -1.9%] 3
All ❌✅ (primary) 1.3% [1.3%, 1.3%] 1

Cycles

Results (secondary 1.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.3% [3.0%, 7.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-3.3%, -2.5%] 2
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.0%] 56
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 25
All ❌✅ (primary) -0.1% [-0.1%, -0.0%] 56

Bootstrap: 489.285s -> 487.19s (-0.43%)
Artifact size: 395.03 MiB -> 394.99 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 5, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

That's just noise :)

Copy link
Copy Markdown
Contributor

@jdonszelmann jdonszelmann left a comment

Choose a reason for hiding this comment

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

Some small things, but in general: damn I'm so happy to see this. Been waiting a year an a half to do this. Thanks to everyone who joined the effort to get to this point, and thanks Jonathan for finally starting The Big Clean Up ™️

View changes since this review

// `TyCtxt::check_mod_attrs`), but by the time that runs the macro
// is expanded, and it doesn't give an error.
validate_attr::emit_fatal_malformed_builtin_attribute(&sess.psess, first_path, sym::path);
emit_malformed_attribute(&sess.psess, first_path.style, first_path.span, sym::path, template!(
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.

this should maybe also be a parsed attribute 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, I tried to make it one but then discovered #154781, so it is blocked on that

@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 Apr 5, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 5, 2026

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

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 5, 2026
@jdonszelmann
Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 5, 2026

📌 Commit 6927e64 has been approved by jdonszelmann

It is now in the queue for this repository.

@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 Apr 5, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors rollup
The perf result is noise

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 5, 2026
…onszelmann

Post-attribute ports cleanup pt. 1

r? @jdonszelmann

This cleans up some checks I could find were for non-parsed attributes, and works towards removing BUILTIN_ATTRIBUTES

All commits do one thing and every commit passes tests, so best reviewed commit by commit
rust-bors bot pushed a commit that referenced this pull request Apr 5, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 5, 2026
…onszelmann

Post-attribute ports cleanup pt. 1

r? @jdonszelmann

This cleans up some checks I could find were for non-parsed attributes, and works towards removing BUILTIN_ATTRIBUTES

All commits do one thing and every commit passes tests, so best reviewed commit by commit
rust-bors bot pushed a commit that referenced this pull request Apr 5, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153440 (Various LTO cleanups)
 - #154561 (Suggest similar keyword when visibility is not followed by an item)
 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154717 (Fix ICE in unsafe binder discriminant helpers)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - #154850 (ast_validation: scalable vectors okay for rustdoc)
rust-bors bot pushed a commit that referenced this pull request Apr 5, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153440 (Various LTO cleanups)
 - #154561 (Suggest similar keyword when visibility is not followed by an item)
 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154717 (Fix ICE in unsafe binder discriminant helpers)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - #154850 (ast_validation: scalable vectors okay for rustdoc)
rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #153440 (Various LTO cleanups)
 - #154561 (Suggest similar keyword when visibility is not followed by an item)
 - #154657 (Fix pattern assignment suggestions for uninitialized bindings)
 - #154717 (Fix ICE in unsafe binder discriminant helpers)
 - #154722 (fix(lints): Improve `ill_formed_attribute_input` with better help message)
 - #154808 (Post-attribute ports cleanup pt. 1)
 - #154849 (Promote `char::is_case_ignorable` from perma-unstable to unstable)
 - #154850 (ast_validation: scalable vectors okay for rustdoc)
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try jobs=i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 6, 2026

⌛ Trying commit 6927e64 with merge e5ceaf0

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/24018143988

rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
Post-attribute ports cleanup pt. 1


try-job: i686-msvc-2
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r-
Causes the try job to hang

@rust-bors rust-bors bot 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 Apr 6, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
[NO MERGE] Debug PR for #154808


try-job: i686-mscv-2
rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
[NO MERGE] Debug PR for #154808


try-job: i686-msvc-2
rust-bors bot pushed a commit that referenced this pull request Apr 6, 2026
[NO MERGE] Debug PR for #154808


try-job: i686-msvc-2
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 6, 2026

💥 Test timed out after 21600s

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-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.

5 participants