-
Notifications
You must be signed in to change notification settings - Fork 12.1k
/
issue-55511.stderr
29 lines (26 loc) · 1.11 KB
/
issue-55511.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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`.