-
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
Don't stop evaluating due to errors before borrow checking #60125
Conversation
This comment has been minimized.
This comment has been minimized.
c3725fe
to
595a151
Compare
src/test/ui/error-codes/E0007.stderr
Outdated
| ^^^^^^^^^^^^^^^^^-^ | ||
| | | | ||
| | value moved here | ||
| value used here after move |
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.
this span isn't quite right. I think it should point to op_string
@@ -6,6 +6,16 @@ LL | for (n, mut m) in &tups { | |||
| | | |||
| both by-ref and by-move used | |||
|
|||
error: aborting due to previous error | |||
error[E0507]: cannot move out of borrowed content |
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.
this diagnostic is actually better than the first one.
This comment has been minimized.
This comment has been minimized.
595a151
to
87ef96d
Compare
@oli-obk It seems to me that with the change made in this PR, we can safely disable everything in |
@@ -9,9 +9,15 @@ fn foo() -> isize { | |||
match x { | |||
Enum::A(_) if { x = Enum::B(false); false } => 1, | |||
//~^ ERROR cannot assign in a pattern guard | |||
//~| WARN cannot assign `x` in match guard | |||
//~| WARN this error has been downgraded to a warning for backwards compatibility |
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.
as a next step we should make this a deny-by-default lint.
That's fine. We do this all the time. I mean, every new syntactical feature is basically that.
There's also code for the exhaustiveness checks in match checking, we can't remove that. Let's merge this PR and then have a look at what effect killing the match borrow check duplication has (in a new PR) @bors r+ |
📌 Commit 87ef96d has been approved by |
☀️ Test successful - checks-travis, status-appveyor |
r? @oli-obk
Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in
src/test/ui/consts/match_ice.rs
.