]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-52534-1.stderr
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / nll / issue-52534-1.stderr
1 error[E0515]: cannot return reference to local variable `x`
2   --> $DIR/issue-52534-1.rs:6:9
3    |
4 LL |         &x
5    |         ^^ returns a reference to data owned by the current function
6
7 error[E0515]: cannot return reference to local variable `x`
8   --> $DIR/issue-52534-1.rs:13:5
9    |
10 LL |     &x
11    |     ^^ returns a reference to data owned by the current function
12
13 error[E0515]: cannot return value referencing local variable `x`
14   --> $DIR/issue-52534-1.rs:19:5
15    |
16 LL |     &&x
17    |     ^--
18    |     ||
19    |     |`x` is borrowed here
20    |     returns a value referencing data owned by the current function
21
22 error[E0515]: cannot return reference to temporary value
23   --> $DIR/issue-52534-1.rs:19:5
24    |
25 LL |     &&x
26    |     ^--
27    |     ||
28    |     |temporary value created here
29    |     returns a reference to data owned by the current function
30
31 error[E0515]: cannot return reference to local variable `x`
32   --> $DIR/issue-52534-1.rs:26:5
33    |
34 LL |     &x
35    |     ^^ returns a reference to data owned by the current function
36
37 error[E0515]: cannot return reference to local variable `x`
38   --> $DIR/issue-52534-1.rs:32:5
39    |
40 LL |     &x
41    |     ^^ returns a reference to data owned by the current function
42
43 error[E0515]: cannot return reference to local variable `x`
44   --> $DIR/issue-52534-1.rs:38:5
45    |
46 LL |     &x
47    |     ^^ returns a reference to data owned by the current function
48
49 error[E0515]: cannot return reference to local variable `x`
50   --> $DIR/issue-52534-1.rs:44:5
51    |
52 LL |     &x
53    |     ^^ returns a reference to data owned by the current function
54
55 error: aborting due to 8 previous errors
56
57 For more information about this error, try `rustc --explain E0515`.