-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Parser ambiguity with trait bounds and closure arguments #12778
Comments
Assigning 1.0, P-backcompat-lang. |
There's no reason to allow patterns for parameters in that position (outside of consistency), is there? |
This cropped up with extern fns. We chose to disallow patterns. Arguably we should do the same, but even then there is an ambiguity in a DST world, since |
There is also now an ambiguity with procs: |
|
This breaks some code that looked like `1 as u32 + 2`, because now `+` is part of the type grammar. Change it to `(1 as u32) + 2`. Part of rust-lang#12778. [breaking-change]
RFC #87. |
This will be addressed with RFC 27 |
RFC rust-lang#27. After a snapshot, the old syntax will be removed. This can break some code that looked like `foo as &Trait:Send`. Now you will need to write `foo as (&Trait+Send)`. Closes rust-lang#12778. [breaking-change]
…t-generics, r=flodiebold Support negative, `char` & `bool` const generics Before: ![Before](https://user-images.githubusercontent.com/29541480/179379832-0c3b2a74-fef6-427e-b89f-7e31d9c37b3d.png) After: ![After](https://user-images.githubusercontent.com/29541480/179379863-b62475dd-e7bf-41f2-b437-08dfe55951af.png) I tried to implement stuff like `Const<{NUM1 + 3 + NUM2}>` by using already existing constant evaluation mechanism for ordinary constants, but turned out to be harder than I thought, maybe because I've never ever tinkered with compilers before
…t-generics, r=Veykril fix: un-inline `ConstScalarOrPath::from_expr_opt` Sorry, but I missed these from rust-lang#12778 `@flodiebold`
…ntic, r=y21 `assigning_clones`: move to `pedantic` so it is allow by default In a nutshell, the `assigning_clones` lint suggests to make your code less readable for a small performance gain. See rust-lang#12778 for more motivation. fixes rust-lang#12778 changelog: [`assigning_clones`]: move to the `pedantic` group
When specifying a trait with a bound as a closure argument, there is currently a parser ambiguity:
Is
arg
a closure that takes an argument of typeSend
, or does it take an argument of type&Trait:Send
.Nominating.
The text was updated successfully, but these errors were encountered: