forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#135273 - dianne:argument-patterns-are-not-bor…
…ing, r=lqd Remove special-casing for argument patterns in MIR typeck (attempt to fix perf regression of rust-lang#133858) See [my comment](rust-lang#133858 (comment)) on rust-lang#133858 for more information. This is just a guess as to what went wrong, and I haven't been able to get the profiler running locally, so I'll need a perf run to make sure this actually helps. There's one test's stderr that suffers a bit, but this was just papering over the issue anyway. Making region errors point to the correct constraints in the presence of invariance/contravariance is a broader problem; the current way it's handled is mostly based on guesswork, luck, and hoping it works out. Properly handling that (somehow) would improve the test's stderr without the hack that this PR reverts.
- Loading branch information
Showing
3 changed files
with
9 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
fn foo(&mut (ref mut v, w): &mut (&u8, &u8), x: &u8) { | ||
*v = x; | ||
//~^ ERROR lifetime may not live long enough | ||
*v = x; | ||
} | ||
|
||
fn main() { } |
14 changes: 8 additions & 6 deletions
14
tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters