-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
base: master
Are you sure you want to change the base?
parse const trait Trait
#143879
Conversation
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 Some changes occurred to the CTFE machinery 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 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 |
This comment has been minimized.
This comment has been minimized.
fbc7508
to
49ab742
Compare
This comment has been minimized.
This comment has been minimized.
49ab742
to
4e9b986
Compare
This comment has been minimized.
This comment has been minimized.
4e9b986
to
b782ee2
Compare
This PR modifies cc @jieyouxu |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #143888) made this pull request unmergeable. Please resolve the merge conflicts. |
|| 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])) |
There was a problem hiding this comment.
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: () = ();
.
There was a problem hiding this 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.
There was a problem hiding this comment.
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).
r? oli-obk or anyone from project-const-traits
cc @rust-lang/project-const-traits