]> git.proxmox.com Git - rustc.git/blob - src/test/ui/wf/wf-misc-methods-issue-28609.nll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / wf / wf-misc-methods-issue-28609.nll.stderr
1 error[E0515]: cannot return value referencing temporary value
2 --> $DIR/wf-misc-methods-issue-28609.rs:32:5
3 |
4 LL | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^--^
6 | | |
7 | | temporary value created here
8 | returns a value referencing data owned by the current function
9
10 error[E0515]: cannot return value referencing local variable `four`
11 --> $DIR/wf-misc-methods-issue-28609.rs:46:5
12 |
13 LL | s.bomb = Some(&four); //~ ERROR does not live long enough
14 | ----- `four` is borrowed here
15 LL | &s
16 | ^^ returns a value referencing data owned by the current function
17
18 error[E0515]: cannot return value referencing local variable `four`
19 --> $DIR/wf-misc-methods-issue-28609.rs:53:5
20 |
21 LL | s.bomb = Some(&four); //~ ERROR does not live long enough
22 | ----- `four` is borrowed here
23 LL | &*s
24 | ^^^ returns a value referencing data owned by the current function
25
26 error[E0515]: cannot return value referencing temporary value
27 --> $DIR/wf-misc-methods-issue-28609.rs:63:5
28 |
29 LL | s << &mut 3 //~ ERROR does not live long enough
30 | ^^^^^^^^^^-
31 | | |
32 | | temporary value created here
33 | returns a value referencing data owned by the current function
34
35 error[E0515]: cannot return value referencing temporary value
36 --> $DIR/wf-misc-methods-issue-28609.rs:68:5
37 |
38 LL | s.shl(&mut 3) //~ ERROR does not live long enough
39 | ^^^^^^^^^^^-^
40 | | |
41 | | temporary value created here
42 | returns a value referencing data owned by the current function
43
44 error[E0515]: cannot return value referencing temporary value
45 --> $DIR/wf-misc-methods-issue-28609.rs:73:5
46 |
47 LL | S2::shl(s, &mut 3) //~ ERROR does not live long enough
48 | ^^^^^^^^^^^^^^^^-^
49 | | |
50 | | temporary value created here
51 | returns a value referencing data owned by the current function
52
53 error: aborting due to 6 previous errors
54
55 For more information about this error, try `rustc --explain E0515`.