Skip to content

Port #[allow_internal_unsafe] to the new attribute system (attempt 2) #145155

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scrabsha
Copy link
Contributor

@scrabsha scrabsha commented Aug 9, 2025

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in #145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? @jdonszelmann 💖

@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2025

jdonszelmann is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added 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. labels Aug 9, 2025
@scrabsha scrabsha marked this pull request as ready for review August 9, 2025 09:40
@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 Aug 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2025

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann

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

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@scrabsha
Copy link
Contributor Author

scrabsha commented Aug 9, 2025

This is going to need a perf run.

@Urgau
Copy link
Member

Urgau commented Aug 9, 2025

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Aug 9, 2025

⌛ Trying commit f777067 with merge 8e5c5f0

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

rust-bors bot added a commit that referenced this pull request Aug 9, 2025
Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 9, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 9, 2025

☀️ Try build successful (CI)
Build commit: 8e5c5f0 (8e5c5f0a55967cf9e0af3916b16d8f61b0684dcc, parent: 2de2456fb7b2b55cb104bb03f30edd145c6015a3)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8e5c5f0): comparison URL.

Overall result: no relevant changes - 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

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

Max RSS (memory usage)

Results (primary 6.9%, secondary -0.3%)

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

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

Cycles

Results (secondary -2.0%)

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
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 463.949s -> 464.997s (0.23%)
Artifact size: 377.40 MiB -> 377.38 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 9, 2025
@scrabsha
Copy link
Contributor Author

scrabsha commented Aug 9, 2025

Yeepee, perf problem fixed ✨

@jdonszelmann
Copy link
Contributor

Yay! Ok let's merge this version then. Damn that makes a large difference

@jdonszelmann
Copy link
Contributor

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Aug 9, 2025

📌 Commit f777067 has been approved by jdonszelmann

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 Aug 9, 2025
@jdonszelmann
Copy link
Contributor

@bors rollup=always (easy to revert anyway and this version seems to have no perf problems at all)

Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? `@jdonszelmann` 💖
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? ``@jdonszelmann`` 💖
@Zalathar
Copy link
Contributor

Per #145195 (comment), this PR seems to have a soft-conflict with #144544.

I'm going to temporarily r- this for now to give that other PR a chance to land, after which this one will need a rebase and re-bless.

@bors r-

@bors bors 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 Aug 10, 2025
@scrabsha
Copy link
Contributor Author

#144544 has been merged, i rebased this on master, i think we're good now :)

@Zalathar
Copy link
Contributor

@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 Aug 11, 2025
@jdonszelmann
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 11, 2025

📌 Commit 6603fe1 has been approved by jdonszelmann

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 Aug 11, 2025
fmease added a commit to fmease/rust that referenced this pull request Aug 11, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? `@jdonszelmann` 💖
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? ``@jdonszelmann`` 💖
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? ```@jdonszelmann``` 💖
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? ````@jdonszelmann```` 💖
bors added a commit that referenced this pull request Aug 12, 2025
Rollup of 15 pull requests

Successful merges:

 - #131477 (Apple: Always pass SDK root when linking with `cc`, and pass it via `SDKROOT` env var)
 - #139806 (std: sys: pal: uefi: Overhaul Time)
 - #144386 (Extract TraitImplHeader in AST/HIR)
 - #144542 (Stabilize `sse4a` and `tbm` target features)
 - #144921 (Don't emit `rustdoc::broken_intra_doc_links` for GitHub-flavored Markdown admonitions like `[!NOTE]`)
 - #145155 (Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2))
 - #145214 (fix: re-enable self-assignment)
 - #145216 (rustdoc: correct negative-to-implicit discriminant display)
 - #145238 (Tweak invalid builtin attribute output)
 - #145249 (Rename entered trace span variables from `_span` to  `_trace`)
 - #145251 (Support using #[unstable_feature_bound] on trait)
 - #145253 (Document compiler and stdlib in stage1 in `pr-check-2` CI job)
 - #145260 (Make explicit guarantees about `Vec`’s allocator)
 - #145263 (Update books)
 - #145273 (Account for new `assert!` desugaring in `!condition` suggestion)

r? `@ghost`
`@rustbot` modify labels: rollup
fmease added a commit to fmease/rust that referenced this pull request Aug 12, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? `````@jdonszelmann````` 💖
bors added a commit that referenced this pull request Aug 12, 2025
Rollup of 14 pull requests

Successful merges:

 - #131477 (Apple: Always pass SDK root when linking with `cc`, and pass it via `SDKROOT` env var)
 - #139806 (std: sys: pal: uefi: Overhaul Time)
 - #144210 (std: thread: Return error if setting thread stack size fails)
 - #144386 (Extract TraitImplHeader in AST/HIR)
 - #144921 (Don't emit `rustdoc::broken_intra_doc_links` for GitHub-flavored Markdown admonitions like `[!NOTE]`)
 - #145155 (Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2))
 - #145214 (fix: re-enable self-assignment)
 - #145216 (rustdoc: correct negative-to-implicit discriminant display)
 - #145238 (Tweak invalid builtin attribute output)
 - #145249 (Rename entered trace span variables from `_span` to  `_trace`)
 - #145251 (Support using #[unstable_feature_bound] on trait)
 - #145253 (Document compiler and stdlib in stage1 in `pr-check-2` CI job)
 - #145263 (Update books)
 - #145273 (Account for new `assert!` desugaring in `!condition` suggestion)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 12, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? ``````@jdonszelmann`````` 💖
bors added a commit that referenced this pull request Aug 12, 2025
Rollup of 17 pull requests

Successful merges:

 - #131477 (Apple: Always pass SDK root when linking with `cc`, and pass it via `SDKROOT` env var)
 - #139806 (std: sys: pal: uefi: Overhaul Time)
 - #144210 (std: thread: Return error if setting thread stack size fails)
 - #144386 (Extract TraitImplHeader in AST/HIR)
 - #144921 (Don't emit `rustdoc::broken_intra_doc_links` for GitHub-flavored Markdown admonitions like `[!NOTE]`)
 - #145155 (Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2))
 - #145214 (fix: re-enable self-assignment)
 - #145216 (rustdoc: correct negative-to-implicit discriminant display)
 - #145238 (Tweak invalid builtin attribute output)
 - #145249 (Rename entered trace span variables from `_span` to  `_trace`)
 - #145251 (Support using #[unstable_feature_bound] on trait)
 - #145253 (Document compiler and stdlib in stage1 in `pr-check-2` CI job)
 - #145260 (Make explicit guarantees about `Vec`’s allocator)
 - #145263 (Update books)
 - #145273 (Account for new `assert!` desugaring in `!condition` suggestion)
 - #145283 (Make I-miscompile imply I-prioritize)
 - #145291 (bootstrap: Only warn about `rust.debug-assertions` if downloading rustc)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 12, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)

This is a slightly modified version of ae1487a, which caused a performance regression (reverted in rust-lang#145086 (comment)). The diff between this PR and the previous one can be seen in 027a1de.

r? ```````@jdonszelmann``````` 💖
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.

7 participants