fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1warning: `&` without an explicit lifetime name cannot be used here 2 --> $DIR/double-elided.rs:4:14 3 | 4LL | const C: &&str = &""; 5 | ^ 6 | 7 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 8 = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010> 9 = note: `#[warn(elided_lifetimes_in_associated_constant)]` on by default 10help: use the `'static` lifetime 11 | 12LL | const C: &'static &str = &""; 13 | +++++++ 14 15warning: `&` without an explicit lifetime name cannot be used here 16 --> $DIR/double-elided.rs:4:15 17 | 18LL | const C: &&str = &""; 19 | ^ 20 | 21 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 22 = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010> 23help: use the `'static` lifetime 24 | 25LL | const C: &&'static str = &""; 26 | +++++++ 27 28error[E0491]: in type `&&str`, reference has a longer lifetime than the data it references 29 --> $DIR/double-elided.rs:4:5 30 | 31LL | const C: &&str = &""; 32 | ^^^^^^^^^^^^^^^^^^^^^ 33 | 34note: the pointer is valid for the anonymous lifetime as defined here 35 --> $DIR/double-elided.rs:4:14 36 | 37LL | const C: &&str = &""; 38 | ^ 39note: but the referenced data is only valid for the anonymous lifetime as defined here 40 --> $DIR/double-elided.rs:4:14 41 | 42LL | const C: &&str = &""; 43 | ^ 44 45error: aborting due to previous error; 2 warnings emitted 46 47For more information about this error, try `rustc --explain E0491`.