summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr
blob: 0ac295c54bccbb34ae8206916228d87fbd2e51f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
warning: not reporting region error due to nll
  --> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
   |
LL |     invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
   |     ^^^^^^

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`
   |                |   has type `&'1 i32`
   |                lifetime `'2` appears in return type

error: aborting due to previous error