summary refs log tree commit diff
path: root/src/test/ui/issue-11681.stderr
blob: ef3d24c6657beff73dcd2556c0705d8f0f95c334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error[E0597]: borrowed value does not live long enough
  --> $DIR/issue-11681.rs:22:20
   |
LL |   let testValue = &Test; //~ ERROR borrowed value does not live long enough
   |                    ^^^^ temporary value does not live long enough
LL |   return testValue;
LL | }
   | - temporary value only lives until here
   |
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 21:15...
  --> $DIR/issue-11681.rs:21:15
   |
LL | fn createTest<'a>() -> &'a Test {
   |               ^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.