diff options
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-55511.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-55511.stderr | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/test/ui/issues/issue-55511.rs b/src/test/ui/issues/issue-55511.rs index 42c6f24b36a..055886bf367 100644 --- a/src/test/ui/issues/issue-55511.rs +++ b/src/test/ui/issues/issue-55511.rs @@ -1,5 +1,5 @@ +#![warn(indirect_structural_match)] use std::cell::Cell; - trait Foo<'a> { const C: Option<Cell<&'a u32>>; } diff --git a/src/test/ui/issues/issue-55511.stderr b/src/test/ui/issues/issue-55511.stderr index c0f702e4fab..e094256f5c8 100644 --- a/src/test/ui/issues/issue-55511.stderr +++ b/src/test/ui/issues/issue-55511.stderr @@ -4,7 +4,11 @@ warning: to use a constant of type `std::cell::Cell` in a pattern, `std::cell::C LL | <() as Foo<'static>>::C => { } | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: #[warn(indirect_structural_match)] on by default +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> |
