-
Notifications
You must be signed in to change notification settings - Fork 13k
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
handle underscore bounds in unexpected places #55162
handle underscore bounds in unexpected places #55162
Conversation
@bors p=1 -- this is an RC2 blocker |
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
cc @rust-lang/compiler — anyone care to review this? I think that @estebank may not have time :) and it's a RC2 blocker |
I'm taking a look now, but if anyone else wants to review, feel free |
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, I caught a couple small things in the tests. r=me once those are resolved
x: &'_ u32, //~ ERROR | ||
} | ||
|
||
struct Bar { |
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 think you meant to make this an enum. The error is a parse error
@@ -0,0 +1,3 @@ | |||
trait Foo<'a> {} | |||
impl<'b: '_> Foo<'b> for i32 {} |
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.
Since the name of this test is where-clauses.rs
I think you may have meant to use a where clause here :)
@bors r=tmandry |
📌 Commit c294ec6 has been approved by |
…mandry handle underscore bounds in unexpected places Per the discussion on #54902, I made it a hard error to use lifetime bounds in various places where they used to be permitted: - `where Foo: Bar<'_>` for example I also moved error reporting to HIR lowering and added `Error` variants to let us suppress downstream errors that result. I (imo) improved the error message wording to be clearer, as well. In the process, I fixed the ICE in #52098. Fixes #54902 Fixes #52098
☀️ Test successful - status-appveyor, status-travis |
Per the discussion on #54902, I made it a hard error to use lifetime bounds in various places where they used to be permitted:
where Foo: Bar<'_>
for exampleI also moved error reporting to HIR lowering and added
Error
variants to let us suppress downstream errors that result.I (imo) improved the error message wording to be clearer, as well.
In the process, I fixed the ICE in #52098.
Fixes #54902
Fixes #52098