Uh oh!
There was an error while loading. Please reload this page.
Parse fully-qualified associated types in generics without whitespace - #20154
Conversation
bcf5544 to
494fafcCompareThis breaks code that looks like this: let x = foo as bar << 13; Change such code to look like this: let x = (foo as bar) << 13; Closesrust-lang#17362. [breaking-change]
494fafc to
d9769ecComparenikomatsakis
commented
Jan 3, 2015
I took the liberty of editing the PR message to include the all important "[breaking-change]" tag. |
nikomatsakis
commented
Jan 3, 2015
Oh, I see it's in the commit. Oh well. |
nikomatsakis
commented
Jan 3, 2015
I wonder if there is a way for us to give a nicer error message when things go wrong. |
ftxqxd
commented
Jan 3, 2015
I’ve thought previously about some kind of process after/during tokenisation (but before parsing) that would look for certain patterns of tokens that look like they could be this sort of subtle syntactical problem; e.g., in this case it would look for a sequence like |
…nikomatsakis This modifies `Parser::eat_lt` to always split up `<<`s, instead of doing so only when a lifetime name followed or the `force` parameter (now removed) was `true`. This is because `Foo<<TYPE` is now a valid start to a type, whereas previously only `Foo<<LIFETIME` was valid. This is a [breaking-change]. Change code that looks like this: ```rust let x = foo as bar << 13; ``` to use parentheses, like this: ```rust let x = (foo as bar) << 13; ``` Closes#17362.
Improve settings tree title and descriptions
This modifies
Parser::eat_ltto always split up<<s, instead of doing so only when a lifetime name followed or theforceparameter (now removed) wastrue. This is becauseFoo<<TYPEis now a valid start to a type, whereas previously onlyFoo<<LIFETIMEwas valid.This is a [breaking-change]. Change code that looks like this:
to use parentheses, like this:
Closes#17362.