blob: ef3d24c6657beff73dcd2556c0705d8f0f95c334 [file] [log] [blame]
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`.