fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1warning: to use a constant of type `std::cell::Cell` in a pattern, `std::cell::Cell` must be annotated with `#[derive(PartialEq, Eq)]` 2 --> $DIR/issue-55511.rs:16:9 3 | 4LL | <() as Foo<'static>>::C => { } 5 | ^^^^^^^^^^^^^^^^^^^^^^^ 6 | 7note: the lint level is defined here 8 --> $DIR/issue-55511.rs:1:9 9 | 10LL | #![warn(indirect_structural_match)] 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 12 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 13 = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411> 14 15error[E0597]: `a` does not live long enough 16 --> $DIR/issue-55511.rs:13:28 17 | 18LL | let b = Some(Cell::new(&a)); 19 | ^^ borrowed value does not live long enough 20... 21LL | <() as Foo<'static>>::C => { } 22 | ----------------------- type annotation requires that `a` is borrowed for `'static` 23... 24LL | } 25 | - `a` dropped here while still borrowed 26 27error: aborting due to previous error 28 29For more information about this error, try `rustc --explain E0597`.