Uh oh!
There was an error while loading. Please reload this page.
Fix syntax error in the compiler - #37278
Conversation
rust-highfive
commented
Oct 19, 2016
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
0e93af8 to
9d179e6CompareIt would be a good idea to audit all call sites of This will be a subject for another PR. |
pnkfelix
commented
Oct 20, 2016
This change looks fine to me, but we should probably pass it through crater before we land it to just make sure that no one is accidentally relying on this being input without error. |
matklad
commented
Oct 31, 2016
One more fun example: |
matklad
commented
Nov 1, 2016
@nikomatsakis can we schedule a crater run here? Or should we try to fix all similar issues at once? |
matklad
commented
Nov 1, 2016
Ok, let's just do everything in #37511 ? |
matklad
commented
Nov 12, 2016
Ok, so #37511 turned out to be more complex that it seemed at first: it's not obvious that we want to forbid empty bounds everywhere. So let's just stick with fixing lifetimes in where clauses: it's already an error not to supply bounds for the type parameters, and it should be an error for lifetimes as well. The crater run in #37511 did not show any regression because of the lifetimes, so I think we can get away without a warning here. |
There was a problem hiding this comment.
I think we shouldn't make this an error until we reach a decision empty bounds lists in #37511.
jseyfried
commented
Nov 14, 2016
@matklad could we just land the first two bullet points from #37511 (comment) in this PR? |
Don't allow lifetimes without any bounds at all
matklad
commented
Nov 14, 2016
Yep, removing check for However, I can't add both I think it's ok to have a single test here, however I am very interested in parser recovery. Could you take a look at this question? |
Thanks! I agree that a single test is fine -- @bors r+ Regarding the question, rustc is capable of analyzing incomplete code, but the parser often isn't good enough at error recovery to get to analysis, even with |
bors
commented
Nov 14, 2016
📌 Commit cf9ff2b has been approved by |
matklad
commented
Nov 14, 2016
Thanks a lot for the review, @jseyfried ! |
bors
commented
Nov 14, 2016
Fix syntax error in the compiler
Currently `rustc` accepts the following code: `fn f<'a>() where 'a {}`. This should be a syntax error, shouldn't it?
Not sure if my changes actually compile, waiting for the LLVM to build.
Currently
rustcaccepts the following code:fn f<'a>() where 'a {}. This should be a syntax error, shouldn't it?Not sure if my changes actually compile, waiting for the LLVM to build.