Skip to content

Port #[allow_internal_unsafe] to the new attribute system #144857

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

Merged
merged 1 commit into from
Aug 8, 2025

Conversation

scrabsha
Copy link
Contributor

@scrabsha scrabsha commented Aug 3, 2025

@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 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-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 Aug 3, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 2025

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

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

cc @jdonszelmann

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann

@scrabsha scrabsha changed the title Part #[allow_internal_unsafe] to the new attribute system Port #[allow_internal_unsafe] to the new attribute system Aug 3, 2025
@scrabsha scrabsha force-pushed the push-pwtyrnmqkrtr branch from da3e3f7 to 4c5e5a9 Compare August 3, 2025 16:48
@rust-log-analyzer

This comment has been minimized.

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

@bors r+ rollup

if attr.has_name(sym::allow_internal_unsafe) {
if AttributeParser::parse_limited(
cx.builder.sess(),
slice::from_ref(attr),
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't know this function existed

@bors
Copy link
Collaborator

bors commented Aug 4, 2025

📌 Commit 0404952 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 4, 2025
@jdonszelmann
Copy link
Contributor

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

oops, conflicts

@jdonszelmann
Copy link
Contributor

@bors delegate+ r=me after a rebase

@bors
Copy link
Collaborator

bors commented Aug 4, 2025

✌️ @scrabsha, you can now approve this pull request!

If @jdonszelmann told you to "r=me" after making some further change, please make that change, then do @bors r=@jdonszelmann

@scrabsha scrabsha force-pushed the push-pwtyrnmqkrtr branch from 0404952 to 4f7a6ac Compare August 7, 2025 13:48
@scrabsha
Copy link
Contributor Author

scrabsha commented Aug 7, 2025

@bors r=@jdonszelmann

@bors
Copy link
Collaborator

bors commented Aug 7, 2025

📌 Commit 4f7a6ac 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 7, 2025
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 7, 2025
…szelmann

Port `#[allow_internal_unsafe]` to the new attribute system

Related to rust-lang#131229 (comment).

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

Successful merges:

 - #144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled)
 - #144857 (Port `#[allow_internal_unsafe]` to the new attribute system)
 - #144900 (Stabilize `unsigned_signed_diff` feature)
 - #144903 (Rename `begin_panic_handler` to `panic_handler`)
 - #144974 (compiler-builtins subtree update)
 - #145004 (Couple of minor cleanups)
 - #145007 (Fix build/doc/test of error index generator)
 - #145018 (Derive `Hash` for rustc_public types)

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

Port `#[allow_internal_unsafe]` to the new attribute system

Related to rust-lang#131229 (comment).

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

Port `#[allow_internal_unsafe]` to the new attribute system

Related to rust-lang#131229 (comment).

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

Successful merges:

 - #144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled)
 - #144857 (Port `#[allow_internal_unsafe]` to the new attribute system)
 - #144900 (Stabilize `unsigned_signed_diff` feature)
 - #144903 (Rename `begin_panic_handler` to `panic_handler`)
 - #144974 (compiler-builtins subtree update)
 - #145007 (Fix build/doc/test of error index generator)
 - #145018 (Derive `Hash` for rustc_public types)
 - #145045 (doc(library): Fix Markdown in `Iterator::by_ref`)
 - #145046 (Fix doc comment of File::try_lock and File::try_lock_shared)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8f51976 into rust-lang:master Aug 8, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 8, 2025
rust-timer added a commit that referenced this pull request Aug 8, 2025
Rollup merge of #144857 - scrabsha:push-pwtyrnmqkrtr, r=jdonszelmann

Port `#[allow_internal_unsafe]` to the new attribute system

Related to #131229 (comment).

r? ````@jdonszelmann````
@scrabsha scrabsha deleted the push-pwtyrnmqkrtr branch August 8, 2025 06:09
@Kobzol
Copy link
Member

Kobzol commented Aug 8, 2025

@rust-timer build ae1487a

Testing for regression in #145074.

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ae1487a): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.8% [0.1%, 4.3%] 128
Regressions ❌
(secondary)
0.6% [0.1%, 1.5%] 42
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.6% [-2.9%, -0.0%] 10
All ❌✅ (primary) 0.8% [0.1%, 4.3%] 128

Max RSS (memory usage)

Results (primary -2.4%, 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)
- - 0
Regressions ❌
(secondary)
1.2% [1.0%, 1.4%] 2
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Cycles

Results (secondary -2.5%)

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.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 465.2s -> 465.365s (0.04%)
Artifact size: 377.41 MiB -> 377.49 MiB (0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 8, 2025
@Kobzol
Copy link
Member

Kobzol commented Aug 8, 2025

@lqd Congratz, you won virtual money!

The regression looks quite bad. @jdonszelmann Maybe we should pre-emptively revert this? Or do you expect this to get resolved soon-ish?

@jdonszelmann
Copy link
Contributor

yes let's revert for now, but some day I do want to land this... But let's not experiment with what's wrong on master. I have a feeling that @JonathanBrouwer 's new parser might help, since it removes a point of validation.

@jdonszelmann
Copy link
Contributor

revert: #145086

bors added a commit that referenced this pull request Aug 8, 2025
…Kobzol

Revert "Port `#[allow_internal_unsafe]` to the new attribute system"

This reverts commit 4f7a6ac (PR: #144857)

r? `@Kobzol`
cc: `@scrabsha`

clean revert it seems :3
bors added a commit that referenced this pull request Aug 9, 2025
…Kobzol

Revert "Port `#[allow_internal_unsafe]` to the new attribute system"

This reverts commit 4f7a6ac (PR: #144857)

r? `@Kobzol`
cc: `@scrabsha`

clean revert it seems :3
github-actions bot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Aug 9, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled)
 - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system)
 - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature)
 - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`)
 - rust-lang/rust#144974 (compiler-builtins subtree update)
 - rust-lang/rust#145007 (Fix build/doc/test of error index generator)
 - rust-lang/rust#145018 (Derive `Hash` for rustc_public types)
 - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`)
 - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 9, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled)
 - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system)
 - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature)
 - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`)
 - rust-lang/rust#144974 (compiler-builtins subtree update)
 - rust-lang/rust#145007 (Fix build/doc/test of error index generator)
 - rust-lang/rust#145018 (Derive `Hash` for rustc_public types)
 - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`)
 - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 9, 2025
…Kobzol

Revert "Port `#[allow_internal_unsafe]` to the new attribute system"

This reverts commit 4f7a6ace9e2f2192af7b5d32f4b1664189e0e143 (PR: rust-lang/rust#144857)

r? `@Kobzol`
cc: `@scrabsha`

clean revert it seems :3
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants