Use span of the closure args in free region errors
This commit is contained in:
parent
ddcf17e1ed
commit
f72b8a44c5
6 changed files with 91 additions and 55 deletions
|
|
@ -8,9 +8,8 @@ error: unsatisfied lifetime constraints
|
|||
--> $DIR/E0621-does-not-trigger-for-closures.rs:25:26
|
||||
|
|
||||
LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
|
||||
| ----------^^^^^-----------------
|
||||
| | | |
|
||||
| | | requires that `'1` must outlive `'2`
|
||||
| ------ ^^^^^ requires that `'1` must outlive `'2`
|
||||
| | |
|
||||
| | has type `&'1 i32`
|
||||
| lifetime `'2` appears in return type
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue