2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return reference to local variable `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:6:9
|
2018-09-14 08:44:45 -05:00
|
|
|
|
|
|
|
|
LL | &x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^ returns a reference to data owned by the current function
|
2018-09-14 08:44:45 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return reference to local variable `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:13:5
|
2018-09-14 08:44:45 -05:00
|
|
|
|
|
|
|
|
LL | &x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^ returns a reference to data owned by the current function
|
2018-09-14 08:44:45 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return value referencing local variable `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:19:5
|
2018-09-14 08:44:45 -05:00
|
|
|
|
|
|
|
|
LL | &&x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^--
|
|
|
|
| ||
|
|
|
|
| |`x` is borrowed here
|
|
|
|
| returns a value referencing data owned by the current function
|
2018-09-14 08:44:45 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return reference to temporary value
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:19:5
|
2018-09-14 08:44:45 -05:00
|
|
|
|
|
|
|
|
LL | &&x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^--
|
|
|
|
| ||
|
|
|
|
| |temporary value created here
|
|
|
|
| returns a reference to data owned by the current function
|
2018-09-14 08:44:45 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return reference to local variable `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:26:5
|
2018-09-18 14:28:06 -05:00
|
|
|
|
|
|
|
|
LL | &x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^ returns a reference to data owned by the current function
|
2018-09-18 14:28:06 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return reference to local variable `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:32:5
|
2018-09-18 14:28:06 -05:00
|
|
|
|
|
|
|
|
LL | &x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^ returns a reference to data owned by the current function
|
2018-09-18 14:28:06 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return reference to local variable `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:38:5
|
2018-09-18 14:28:06 -05:00
|
|
|
|
|
|
|
|
LL | &x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^ returns a reference to data owned by the current function
|
2018-09-18 14:28:06 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
error[E0515]: cannot return reference to local variable `x`
|
2019-04-07 10:07:36 -05:00
|
|
|
--> $DIR/issue-52534-1.rs:44:5
|
2018-09-18 14:28:06 -05:00
|
|
|
|
|
|
|
|
LL | &x
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^ returns a reference to data owned by the current function
|
2018-09-18 14:28:06 -05:00
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2018-09-14 08:44:45 -05:00
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
For more information about this error, try `rustc --explain E0515`.
|