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