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