]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0515]: cannot return value referencing temporary value |
2 | --> $DIR/issue-11681.rs:13:10 | |
8faf50e0 | 3 | | |
532ac7d7 | 4 | LL | let testValue = &Test; |
48663c56 | 5 | | ---- temporary value created here |
8faf50e0 | 6 | LL | return testValue; |
48663c56 | 7 | | ^^^^^^^^^ returns a value referencing data owned by the current function |
8faf50e0 XL |
8 | |
9 | error: aborting due to previous error | |
10 | ||
48663c56 | 11 | For more information about this error, try `rustc --explain E0515`. |