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