]> git.lizzy.rs Git - rust.git/blob - tests/ui/wf/wf-misc-methods-issue-28609.stderr
Don't resolve type var roots in point_at_expr_source_of_inferred_type
[rust.git] / tests / ui / wf / wf-misc-methods-issue-28609.stderr
1 error[E0515]: cannot return value referencing temporary value
2   --> $DIR/wf-misc-methods-issue-28609.rs:22:5
3    |
4 LL |     s.transmute_inherent(&mut 42)
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:36:5
12    |
13 LL |     s.bomb = Some(&four);
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:43:5
20    |
21 LL |     s.bomb = Some(&four);
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:53:5
28    |
29 LL |     s << &mut 3
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:58:5
37    |
38 LL |     s.shl(&mut 3)
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:63:5
46    |
47 LL |     S2::shl(s, &mut 3)
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`.