Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jan 10, 2026

Part of #149865.

I also used this opportunity to remove the id_is_crate_root method.

Once this is merged, I think I'll try to see if we can remove target_id as well.

r? @JonathanBrouwer

@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2026

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

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 10, 2026
pub(crate) target_span: Span,
/// The id ([`NodeId`] if `S` is `Early`, [`HirId`] if `S` is `Late`) of the syntactical component this attribute was applied to
pub(crate) target_id: S::Id,
pub(crate) target: Option<rustc_hir::Target>,
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels a little weird to me that target can be None, but at the same time I see getting parse_single_args to take a Target is just really annoying...
I think this is acceptable

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, not sure how to deal with that. I have some ideas, gonna give it a try later on.

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought about it more but I really don't see a nice way of fixing this, but if you do feel free to still take a look

Copy link
Member Author

Choose a reason for hiding this comment

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

Just a hunch, I'll see how far it leads me.

@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 Jan 10, 2026
@GuillaumeGomez
Copy link
Member Author

Applied suggestion for macro naming.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 11, 2026

☔ The latest upstream changes (presumably #150957) made this pull request unmergeable. Please resolve the merge conflicts.

@JonathanBrouwer
Copy link
Contributor

r=me after rebasing

@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2026

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.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

@bors r=JonathanBrouwer orllup

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 12, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 12, 2026

📌 Commit ef1e4e6 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 12, 2026
@GuillaumeGomez
Copy link
Member Author

@bors rollup

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 12, 2026
…ouwer

Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`

Part of rust-lang#149865.

I also used this opportunity to remove the `id_is_crate_root` method.

Once this is merged, I think I'll try to see if we can remove `target_id` as well.

r? @JonathanBrouwer
rust-bors bot pushed a commit that referenced this pull request Jan 12, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #145343 (Dogfood `-Zno-embed-metadata` in the standard library)
 - #150151 (Destabilise `target-spec-json`)
 - #150723 (std: move `errno` and related functions into `sys::io`)
 - #150771 (Remove legacy homu `try` and `auto` branch mentions)
 - #150826 (Add `f16` inline ASM support for s390x)
 - #150934 (Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`)
 - #150943 (Port `#[must_not_suspend]` to attribute parser)
 - #150990 (std: sys: net: uefi: Make TcpStream Send)
 - #150995 (core: ptr: split_at_mut: fix typo in safety doc)
 - #150998 (Relax test expectation for @__llvm_profile_runtime_user)
 - #151002 (Remove a workaround for a bug (take 2))
 - #151005 (Fix typo in `MaybeUninit` docs)
 - #151011 (Update books)

r? @ghost
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 12, 2026
…ouwer

Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`

Part of rust-lang#149865.

I also used this opportunity to remove the `id_is_crate_root` method.

Once this is merged, I think I'll try to see if we can remove `target_id` as well.

r? @JonathanBrouwer
rust-bors bot pushed a commit that referenced this pull request Jan 13, 2026
Rollup of 12 pull requests

Successful merges:

 - #145343 (Dogfood `-Zno-embed-metadata` in the standard library)
 - #150151 (Destabilise `target-spec-json`)
 - #150723 (std: move `errno` and related functions into `sys::io`)
 - #150826 (Add `f16` inline ASM support for s390x)
 - #150934 (Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`)
 - #150943 (Port `#[must_not_suspend]` to attribute parser)
 - #150990 (std: sys: net: uefi: Make TcpStream Send)
 - #150995 (core: ptr: split_at_mut: fix typo in safety doc)
 - #150998 (Relax test expectation for @__llvm_profile_runtime_user)
 - #151002 (Remove a workaround for a bug (take 2))
 - #151005 (Fix typo in `MaybeUninit` docs)
 - #151011 (Update books)

r? @ghost
rust-bors bot pushed a commit that referenced this pull request Jan 13, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #150151 (Destabilise `target-spec-json`)
 - #150826 (Add `f16` inline ASM support for s390x)
 - #150883 (Improve span for "unresolved intra doc link" on `deprecated` attribute)
 - #150934 (Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`)
 - #150943 (Port `#[must_not_suspend]` to attribute parser)
 - #150990 (std: sys: net: uefi: Make TcpStream Send)
 - #150995 (core: ptr: split_at_mut: fix typo in safety doc)
 - #150998 (Relax test expectation for @__llvm_profile_runtime_user)
 - #151002 (Remove a workaround for a bug (take 2))
 - #151005 (Fix typo in `MaybeUninit` docs)
 - #151011 (Update books)
 - #151029 (rustc-dev-guide subtree update)
 - #151032 (fix: added missing backtick in triagebot.toml)
 - #151035 (Don't suggest replacing closure parameter with type name)

r? @ghost
@rust-bors rust-bors bot merged commit e33f5aa into rust-lang:main Jan 13, 2026
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 13, 2026
@GuillaumeGomez GuillaumeGomez deleted the move-doc-attr-checks branch January 13, 2026 14:21
rust-timer added a commit that referenced this pull request Jan 13, 2026
Rollup merge of #150934 - move-doc-attr-checks, r=JonathanBrouwer

Move some checks from `check_doc_attrs` directly into `rustc_attr_parsing`

Part of #149865.

I also used this opportunity to remove the `id_is_crate_root` method.

Once this is merged, I think I'll try to see if we can remove `target_id` as well.

r? @JonathanBrouwer
@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Jan 13, 2026

@rust-timer build 01517e8
Looking into perf regression of #151051

@rust-timer

This comment has been minimized.

@rust-timer

This comment was marked as outdated.

@JonathanBrouwer
Copy link
Contributor

@rust-timer build 01517e8

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (01517e8): comparison URL.

Overall result: ❌ regressions - please read the text below

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.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@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.1% [0.1%, 0.1%] 1
Regressions ❌
(secondary)
0.2% [0.1%, 0.3%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.1%] 1

Max RSS (memory usage)

Results (primary 2.0%, secondary -3.1%)

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

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

Cycles

Results (primary 2.9%, secondary 3.2%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.4%, 3.7%] 5
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [2.4%, 3.7%] 5

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 473.958s -> 474.412s (0.10%)
Artifact size: 383.19 MiB -> 383.18 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) perf-regression Performance regression. 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. T-rustdoc Relevant to the rustdoc 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