Skip to content

parse const trait Trait #143879

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

fee1-dead
Copy link
Member

r? oli-obk or anyone from project-const-traits

cc @rust-lang/project-const-traits

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide 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 Jul 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2025

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol, @tshepang

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

HIR ty lowering was modified

cc @fmease

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

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

cc @jdonszelmann

@fee1-dead fee1-dead added the F-const_trait_impl `#![feature(const_trait_impl)]` label Jul 13, 2025
@rust-log-analyzer

This comment has been minimized.

@fee1-dead fee1-dead force-pushed the push-lrlpoouyqqry branch from fbc7508 to 49ab742 Compare July 13, 2025 12:08
@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jul 13, 2025
@rust-log-analyzer

This comment has been minimized.

@fee1-dead fee1-dead force-pushed the push-lrlpoouyqqry branch from 49ab742 to 4e9b986 Compare July 13, 2025 14:24
@rust-log-analyzer

This comment has been minimized.

@fee1-dead fee1-dead force-pushed the push-lrlpoouyqqry branch from 4e9b986 to b782ee2 Compare July 13, 2025 15:54
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Jul 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2025

This PR modifies run-make tests.

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jul 13, 2025

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

Comment on lines 881 to 882
|| self.check_keyword(exp!(Const)) && (self.is_keyword_ahead(1, &[kw::Trait])
|| self.is_keyword_ahead(1, &[kw::Unsafe]) && self.is_keyword_ahead(2, &[kw::Trait, kw::Auto]))
Copy link
Member

@fmease fmease Jul 13, 2025

Choose a reason for hiding this comment

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

This doesn't admit const auto trait Trait {}, it should tho (it already allows const unsafe auto trait Trait {}). Ofc for that const auto needs to be followed by trait so we don't regress const auto: () = ();.

Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! r=me after rebase, fmt fix and with nits addressed.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this file should be modified? This will just fail in r-a's repo after the sync bc r-a doesn't impl the new syntax (we currently don't run r-a's tests in r-l/r's CI).

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine, we actually parse const trait and the tests still run with that change.

@fee1-dead fee1-dead force-pushed the push-lrlpoouyqqry branch from b782ee2 to 124c33e Compare July 14, 2025 06:31
@fee1-dead
Copy link
Member Author

r? fmease
@bors r=fmease

@bors
Copy link
Collaborator

bors commented Jul 14, 2025

📌 Commit 124c33e has been approved by fmease

It is now in the queue for this repository.

@rustbot
Copy link
Collaborator

rustbot commented Jul 14, 2025

fmease is not on the review rotation at the moment.
They may take a while to respond.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 14, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide F-const_trait_impl `#![feature(const_trait_impl)]` 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants