Commit c5313fe
committed
Point at multiple outlives requirements instead of just the first one
```
error[E0716]: temporary value dropped while borrowed
--> $DIR/multiple-sources-for-outlives-requirement.rs:5:38
|
LL | fn foo<'b>() {
| -- lifetime `'b` defined here
LL | outlives_indir::<'_, 'b, _>(&mut 1u32);
| ---------------------------------^^^^-- temporary value is freed at the end of this statement
| | |
| | creates a temporary value which is freed while still in use
| argument requires that borrow lasts for `'b`
|
note: requirements that the value outlives `'b` introduced here
--> $DIR/multiple-sources-for-outlives-requirement.rs:1:23
|
LL | fn outlives_indir<'a: 'b, 'b, T: 'a>(_x: T) {}
| ^^ ^^
```1 parent 58f5260 commit c5313fe
File tree
3 files changed
+39
-5
lines changed- compiler/rustc_borrowck/src/diagnostics
- tests/ui/regions
3 files changed
+39
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
428 | 431 | | |
429 | | - | |
| 432 | + | |
430 | 433 | | |
431 | | - | |
| 434 | + | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments