Skip to content

Port several trait/coherence-related attributes the new attribute system #143403

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 13 commits into from
Jul 12, 2025

Conversation

GrigorenkoPV
Copy link
Contributor

@GrigorenkoPV GrigorenkoPV commented Jul 3, 2025

Part of #131229

This ports:

  • #[const_trait]
  • #[rustc_deny_explicit_impl]
  • #[rustc_do_not_implement_via_object]
  • #[rustc_coinductive]
  • #[type_const]
  • #[rustc_specialization_trait]
  • #[rustc_unsafe_specialization_marker]
  • #[marker]
  • #[fundamental]
  • #[rustc_paren_sugar]
  • #[rustc_allow_incoherent_impl]
  • #[rustc_coherence_is_core]

This also changes #[marker] to error on duplicates instead of warning.
cc #142838, but I don't think it matters too much, since it's unstable.

r? @oli-obk

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

rustbot commented Jul 3, 2025

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in compiler/rustc_attr_data_structures

cc @jdonszelmann

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

cc @jdonszelmann

@jdonszelmann
Copy link
Contributor

@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2025
@bors
Copy link
Collaborator

bors commented Jul 4, 2025

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

@GrigorenkoPV
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jul 4, 2025
@bors
Copy link
Collaborator

bors commented Jul 5, 2025

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

@bors
Copy link
Collaborator

bors commented Jul 6, 2025

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

@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 8, 2025

📌 Commit da5ea0a 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 Jul 8, 2025
@bors
Copy link
Collaborator

bors commented Jul 8, 2025

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jul 8, 2025

📌 Commit da5ea0a has been approved by jdonszelmann

It is now in the queue for this repository.

bors added a commit that referenced this pull request Jul 8, 2025
Rollup of 8 pull requests

Successful merges:

 - #143402 (Port several linking (linkage?) related attributes the new attribute system )
 - #143555 (Don't mark `#[target_feature]` safe fns as unsafe in rustdoc JSON.)
 - #143593 (Port #[rustc_dummy])
 - #143600 (Update intro blurb in `wasm32-wasip1` docs)
 - #143603 (Clarify the meaning of `AttributeOrder::KeepFirst` and `AttributeOrder::KeepLast`)
 - #143606 (configure.py: Write last key in each section)
 - #143620 (fix: Remove newline from multiple crate versions note)
 - #143622 (Add target maintainer information for mips64-unknown-linux-muslabi64)

Failed merges:

 - #143403 (Port several trait/coherence-related attributes the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
@GrigorenkoPV
Copy link
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 Jul 8, 2025
@jdonszelmann
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 11, 2025

📌 Commit e584ed0 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 Jul 11, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 11, 2025
…jdonszelmann

Port several trait/coherence-related attributes the new attribute system

Part of rust-lang#131229

This ports:
- `#[const_trait]`
- `#[rustc_deny_explicit_impl]`
- `#[rustc_do_not_implement_via_object]`
- `#[rustc_coinductive]`
- `#[type_const]`
- `#[rustc_specialization_trait]`
- `#[rustc_unsafe_specialization_marker]`
- `#[marker]`
- `#[fundamental]`
- `#[rustc_paren_sugar]`
- `#[rustc_allow_incoherent_impl]`
- `#[rustc_coherence_is_core]`

This also changes `#[marker]` to error on duplicates instead of warning.
cc rust-lang#142838, but I don't think it matters too much, since it's unstable.

r? `@oli-obk`
bors added a commit that referenced this pull request Jul 11, 2025
Rollup of 10 pull requests

Successful merges:

 - #142301 (tests: Fix duplicated-path-in-error fail with musl)
 - #143403 (Port several trait/coherence-related attributes the new attribute system)
 - #143633 (fix: correct assertion to check for 'noinline' attribute presence before removal)
 - #143647 (Clarify and expand documentation for std::sys_common dependency structure)
 - #143716 (compiler: doc/comment some codegen-for-functions interfaces)
 - #143747 (Add target maintainer information for aarch64-unknown-linux-musl)
 - #143759 (Fix typos in function names in the `target_feature` test)
 - #143767 (Bump `src/tools/x` to Edition 2024 and some cleanups)
 - #143769 (Remove support for SwitchInt edge effects in backward dataflow)
 - #143770 (build-helper: clippy fixes)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 12, 2025
Rollup of 9 pull requests

Successful merges:

 - #143403 (Port several trait/coherence-related attributes the new attribute system)
 - #143633 (fix: correct assertion to check for 'noinline' attribute presence before removal)
 - #143647 (Clarify and expand documentation for std::sys_common dependency structure)
 - #143716 (compiler: doc/comment some codegen-for-functions interfaces)
 - #143747 (Add target maintainer information for aarch64-unknown-linux-musl)
 - #143759 (Fix typos in function names in the `target_feature` test)
 - #143767 (Bump `src/tools/x` to Edition 2024 and some cleanups)
 - #143769 (Remove support for SwitchInt edge effects in backward dataflow)
 - #143770 (build-helper: clippy fixes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c8780ff into rust-lang:master Jul 12, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 12, 2025
@GrigorenkoPV GrigorenkoPV deleted the attributes/traits branch July 12, 2025 13:49
rust-timer added a commit that referenced this pull request Jul 12, 2025
Rollup merge of #143403 - GrigorenkoPV:attributes/traits, r=jdonszelmann

Port several trait/coherence-related attributes the new attribute system

Part of #131229

This ports:
- `#[const_trait]`
- `#[rustc_deny_explicit_impl]`
- `#[rustc_do_not_implement_via_object]`
- `#[rustc_coinductive]`
- `#[type_const]`
- `#[rustc_specialization_trait]`
- `#[rustc_unsafe_specialization_marker]`
- `#[marker]`
- `#[fundamental]`
- `#[rustc_paren_sugar]`
- `#[rustc_allow_incoherent_impl]`
- `#[rustc_coherence_is_core]`

This also changes `#[marker]` to error on duplicates instead of warning.
cc #142838, but I don't think it matters too much, since it's unstable.

r? ``@oli-obk``
@Kobzol
Copy link
Member

Kobzol commented Jul 12, 2025

@rust-timer build 4967043

Checking for #143810. The bootstrap regression is quite likely caused by this PR.

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4967043): 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.2% [0.1%, 0.3%] 39
Regressions ❌
(secondary)
0.4% [0.1%, 1.0%] 33
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.3%] 4
All ❌✅ (primary) 0.2% [0.1%, 0.3%] 39

Max RSS (memory usage)

Results (primary -1.4%, 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)
6.1% [6.1%, 6.1%] 1
Improvements ✅
(primary)
-1.4% [-1.6%, -1.2%] 2
Improvements ✅
(secondary)
-6.3% [-6.3%, -6.3%] 1
All ❌✅ (primary) -1.4% [-1.6%, -1.2%] 2

Cycles

Results (primary -2.6%, secondary -6.6%)

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)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
-2.6% [-3.1%, -2.3%] 4
Improvements ✅
(secondary)
-7.9% [-11.7%, -2.3%] 7
All ❌✅ (primary) -2.6% [-3.1%, -2.3%] 4

Binary size

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

Bootstrap: 462.356s -> 465.002s (0.57%)
Artifact size: 374.66 MiB -> 374.78 MiB (0.03%)

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

Kobzol commented Jul 13, 2025

Yeah this is definitely the cause of the regression from the rollup. The bootstrap regression is interesting, I wonder if the trait consts or the big enums somehow stress rustc a lot.. or maybe it's the complex nested parser types.

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