blob: e094256f5c8271cd9d8353822f7fdadf472bb88e [file] [log] [blame]
warning: to use a constant of type `std::cell::Cell` in a pattern, `std::cell::Cell` must be annotated with `#[derive(PartialEq, Eq)]`
--> $DIR/issue-55511.rs:16:9
|
LL | <() as Foo<'static>>::C => { }
| ^^^^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/issue-55511.rs:1:9
|
LL | #![warn(indirect_structural_match)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
error[E0597]: `a` does not live long enough
--> $DIR/issue-55511.rs:13:28
|
LL | let b = Some(Cell::new(&a));
| ^^ borrowed value does not live long enough
...
LL | <() as Foo<'static>>::C => { }
| ----------------------- type annotation requires that `a` is borrowed for `'static`
...
LL | }
| - `a` dropped here while still borrowed
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.