2019-04-22 07:40:08 +00:00
|
|
|
error[E0515]: cannot return value referencing temporary value
|
|
|
|
--> $DIR/wf-misc-methods-issue-28609.rs:22:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | s.transmute_inherent(&mut 42)
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^--^
|
|
|
|
| | |
|
|
|
|
| | temporary value created here
|
|
|
|
| returns a value referencing data owned by the current function
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-22 07:40:08 +00:00
|
|
|
error[E0515]: cannot return value referencing local variable `four`
|
|
|
|
--> $DIR/wf-misc-methods-issue-28609.rs:36:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | s.bomb = Some(&four);
|
2019-04-22 07:40:08 +00:00
|
|
|
| ----- `four` is borrowed here
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | &s
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^ returns a value referencing data owned by the current function
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-22 07:40:08 +00:00
|
|
|
error[E0515]: cannot return value referencing local variable `four`
|
|
|
|
--> $DIR/wf-misc-methods-issue-28609.rs:43:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | s.bomb = Some(&four);
|
2019-04-22 07:40:08 +00:00
|
|
|
| ----- `four` is borrowed here
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | &*s
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^ returns a value referencing data owned by the current function
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-22 07:40:08 +00:00
|
|
|
error[E0515]: cannot return value referencing temporary value
|
|
|
|
--> $DIR/wf-misc-methods-issue-28609.rs:53:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | s << &mut 3
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^^^^^^^^-
|
|
|
|
| | |
|
|
|
|
| | temporary value created here
|
|
|
|
| returns a value referencing data owned by the current function
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-22 07:40:08 +00:00
|
|
|
error[E0515]: cannot return value referencing temporary value
|
|
|
|
--> $DIR/wf-misc-methods-issue-28609.rs:58:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | s.shl(&mut 3)
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^^^^^^^^^-^
|
|
|
|
| | |
|
|
|
|
| | temporary value created here
|
|
|
|
| returns a value referencing data owned by the current function
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-22 07:40:08 +00:00
|
|
|
error[E0515]: cannot return value referencing temporary value
|
|
|
|
--> $DIR/wf-misc-methods-issue-28609.rs:63:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | S2::shl(s, &mut 3)
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^-^
|
|
|
|
| | |
|
|
|
|
| | temporary value created here
|
|
|
|
| returns a value referencing data owned by the current function
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|
2019-04-22 07:40:08 +00:00
|
|
|
For more information about this error, try `rustc --explain E0515`.
|