Skip to content

Conversation

@oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 22, 2025

Allow const trait Foo = Bar + [const] Baz; trait alias declarations. Their rules are the same as with super traits of const traits. So [const] Baz or const Baz is only required for [const] Foo or const Foo bounds respectively.

tracking issue #41517 (part of the general trait alias feature gate, but I can split it out into a separate const trait alias feature gate. I just assumed that const traits would stabilize before trait aliases, and we'd want to stabilize trait aliases together with const trait aliases at the same time)

r? @compiler-errors @fee1-dead

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 22, 2025

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

HIR ty lowering was modified

cc @fmease

Changes to the size of AST and/or HIR nodes.

cc @nnethercote

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

static_assert_size!(Item, 144);
static_assert_size!(ItemKind, 80);
static_assert_size!(Item, 136);
static_assert_size!(ItemKind, 72);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@blyxyas
Copy link
Member

blyxyas commented Jul 22, 2025

Clippy changes are approved.

@bors
Copy link
Collaborator

bors commented Jul 23, 2025

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

@oli-obk oli-obk force-pushed the const_trait_alias branch 2 times, most recently from cb809b6 to 7508ac9 Compare July 23, 2025 14:30
@bors
Copy link
Collaborator

bors commented Jul 23, 2025

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

@oli-obk oli-obk force-pushed the const_trait_alias branch from 7508ac9 to 5d3eb69 Compare July 24, 2025 07:25
@bors
Copy link
Collaborator

bors commented Jul 27, 2025

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

@compiler-errors
Copy link
Member

r? fee1-dead or re-roll perhaps

@rustbot rustbot assigned fee1-dead and unassigned compiler-errors Sep 14, 2025
Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

quick review because i didn't get enough time

Didn't look at the solver parts yet, will do later

View changes since this review

@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 Sep 16, 2025
@fee1-dead
Copy link
Member

The commits should probably be squashed.

@oli-obk
Copy link
Contributor Author

oli-obk commented Sep 16, 2025

The commits should probably be squashed.

Hmm... I split them on purpose to only make atomic testable changes

@rustbot rustbot added the T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. label Sep 19, 2025
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@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 Oct 2, 2025
@bors
Copy link
Collaborator

bors commented Oct 22, 2025

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

@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2025

This PR was rebased onto a different master 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.

@oli-obk
Copy link
Contributor Author

oli-obk commented Oct 30, 2025

@bors r=fee1-dead

@bors
Copy link
Collaborator

bors commented Oct 30, 2025

📌 Commit ebb249d has been approved by fee1-dead

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 Oct 30, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 30, 2025
…dead

Constify trait aliases

Allow `const trait Foo = Bar + [const] Baz;` trait alias declarations. Their rules are the same as with super traits of const traits. So `[const] Baz` or `const Baz` is only required for `[const] Foo` or `const Foo` bounds respectively.

tracking issue rust-lang#41517 (part of the general trait alias feature gate, but I can split it out into a separate const trait alias feature gate. I just assumed that const traits would stabilize before trait aliases, and we'd want to stabilize trait aliases together with const trait aliases at the same time)

r? `@compiler-errors` `@fee1-dead`
bors added a commit that referenced this pull request Oct 30, 2025
Rollup of 4 pull requests

Successful merges:

 - #144291 (Constify trait aliases)
 - #147633 (Add new `--bypass-ignore-backends` option)
 - #148262 (Fix types being marked as dead when they are inferred generic arguments)
 - #148268 (rustdoc: fix `--emit=dep-info` on scraped examples)

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

Successful merges:

 - #144291 (Constify trait aliases)
 - #147633 (Add new `--bypass-ignore-backends` option)
 - #148252 (Improve diagnose for unconditional panic when resource limit)
 - #148262 (Fix types being marked as dead when they are inferred generic arguments)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 149ad71 into rust-lang:master Oct 31, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Oct 31, 2025
rust-timer added a commit that referenced this pull request Oct 31, 2025
Rollup merge of #144291 - oli-obk:const_trait_alias, r=fee1-dead

Constify trait aliases

Allow `const trait Foo = Bar + [const] Baz;` trait alias declarations. Their rules are the same as with super traits of const traits. So `[const] Baz` or `const Baz` is only required for `[const] Foo` or `const Foo` bounds respectively.

tracking issue #41517 (part of the general trait alias feature gate, but I can split it out into a separate const trait alias feature gate. I just assumed that const traits would stabilize before trait aliases, and we'd want to stabilize trait aliases together with const trait aliases at the same time)

r? ``@compiler-errors`` ``@fee1-dead``
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Nov 3, 2025
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#144291 (Constify trait aliases)
 - rust-lang/rust#147633 (Add new `--bypass-ignore-backends` option)
 - rust-lang/rust#148252 (Improve diagnose for unconditional panic when resource limit)
 - rust-lang/rust#148262 (Fix types being marked as dead when they are inferred generic arguments)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. 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. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants