-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New const traits syntax #139858
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?
New const traits syntax #139858
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
f6be056
to
2003458
Compare
This comment has been minimized.
This comment has been minimized.
2003458
to
d6da247
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
d6da247
to
e16c40b
Compare
e16c40b
to
234ba91
Compare
This comment has been minimized.
This comment has been minimized.
234ba91
to
ef1acde
Compare
ef1acde
to
5fa25d4
Compare
This comment has been minimized.
This comment has been minimized.
5fa25d4
to
7762468
Compare
☔ The latest upstream changes (presumably #140695) made this pull request unmergeable. Please resolve the merge conflicts. |
Have we actually settled on a syntax here? Sorry for punting it back over, but would like to get an update here if it's actually ready to review :> ping me when it's ready, sorry for the delays! @rustbot author |
Reminder, once the PR becomes ready for a review, use |
No. Discussion is ongoing. |
This comment has been minimized.
This comment has been minimized.
d292dc6
to
ae4dc9e
Compare
This comment has been minimized.
This comment has been minimized.
ae4dc9e
to
2e751d2
Compare
This comment has been minimized.
This comment has been minimized.
2e751d2
to
aca6032
Compare
This comment has been minimized.
This comment has been minimized.
aca6032
to
06bc396
Compare
Afaict the syntax with which to move forward was settled as much as it could be in the last lang team design meeting. The lang team wants to get hands-on experience with the feature to see how it feels, so this PR is ready to be merged now. |
06bc396
to
dc95649
Compare
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.
not necessary for this PR; but would be nice if we renamed the "tilde-const" in the file names to either something syntax agnostic ("maybe-const") or matches the latest syntax
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.
done in a follow-up commit
dc95649
to
c548946
Compare
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
c548946
to
a9f1140
Compare
There are changes to the cc @jieyouxu |
The job Click to see the possible cause of the failure (guessed by this bot)
|
This PR only affects the AST and doesn't actually change anything semantically.
All occurrences of
~const
outside of libcore have been replaced by[const]
. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts~const
into[const]
. After this we can remove the~const
support from the parserCaveat discovered during impl: there is no legacy bare trait object recovery for
[const] Trait
as that snippet in type position goes down the slice /array parsing code and will errorr? @fee1-dead
cc @nikomatsakis @traviscross @compiler-errors