Skip to content

Commit 00e0d87

Browse files
committed
Turn indirect_structural_match lint on explicitly in ui tests.
1 parent 1b1b538 commit 00e0d87

13 files changed

+37
-13
lines changed

src/test/ui/issues/issue-55511.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
#![warn(indirect_structural_match)]
12
use std::cell::Cell;
2-
33
trait Foo<'a> {
44
const C: Option<Cell<&'a u32>>;
55
}

src/test/ui/issues/issue-55511.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ warning: to use a constant of type `std::cell::Cell` in a pattern, `std::cell::C
44
LL | <() as Foo<'static>>::C => { }
55
| ^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(indirect_structural_match)] on by default
7+
note: lint level defined here
8+
--> $DIR/issue-55511.rs:1:9
9+
|
10+
LL | #![warn(indirect_structural_match)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
812
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
913
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
1014

src/test/ui/rfc1445/cant-hide-behind-direct-struct-param.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// through that we had intended to reject.
55
//
66
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339
7-
7+
#![warn(indirect_structural_match)]
88
struct NoDerive(i32);
99

1010
// This impl makes NoDerive irreflexive.

src/test/ui/rfc1445/cant-hide-behind-doubly-indirect-embedded.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// through that we had intended to reject.
55
//
66
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339
7-
7+
#![warn(indirect_structural_match)]
88
// run-pass
99

1010
struct NoDerive(i32);

src/test/ui/rfc1445/cant-hide-behind-doubly-indirect-embedded.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
44
LL | WRAP_DOUBLY_INDIRECT_INLINE => { panic!("WRAP_DOUBLY_INDIRECT_INLINE matched itself"); }
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(indirect_structural_match)] on by default
7+
note: lint level defined here
8+
--> $DIR/cant-hide-behind-doubly-indirect-embedded.rs:7:9
9+
|
10+
LL | #![warn(indirect_structural_match)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
812
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
913
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
1014

src/test/ui/rfc1445/cant-hide-behind-doubly-indirect-param.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// through that we had intended to reject.
55
//
66
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339
7-
7+
#![warn(indirect_structural_match)]
88
// run-pass
99

1010
struct NoDerive(i32);

src/test/ui/rfc1445/cant-hide-behind-doubly-indirect-param.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
44
LL | WRAP_DOUBLY_INDIRECT_PARAM => { panic!("WRAP_DOUBLY_INDIRECT_PARAM matched itself"); }
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(indirect_structural_match)] on by default
7+
note: lint level defined here
8+
--> $DIR/cant-hide-behind-doubly-indirect-param.rs:7:9
9+
|
10+
LL | #![warn(indirect_structural_match)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
812
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
913
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
1014

src/test/ui/rfc1445/cant-hide-behind-indirect-struct-embedded.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// through that we had intended to reject.
55
//
66
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339
7-
7+
#![warn(indirect_structural_match)]
88
// run-pass
99

1010
struct NoDerive(i32);

src/test/ui/rfc1445/cant-hide-behind-indirect-struct-embedded.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
44
LL | WRAP_INDIRECT_INLINE => { panic!("WRAP_INDIRECT_INLINE matched itself"); }
55
| ^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(indirect_structural_match)] on by default
7+
note: lint level defined here
8+
--> $DIR/cant-hide-behind-indirect-struct-embedded.rs:7:9
9+
|
10+
LL | #![warn(indirect_structural_match)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
812
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
913
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
1014

src/test/ui/rfc1445/cant-hide-behind-indirect-struct-param.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// through that we had intended to reject.
55
//
66
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339
7-
7+
#![warn(indirect_structural_match)]
88
// run-pass
99

1010
struct NoDerive(i32);

src/test/ui/rfc1445/cant-hide-behind-indirect-struct-param.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
44
LL | WRAP_INDIRECT_PARAM => { panic!("WRAP_INDIRECT_PARAM matched itself"); }
55
| ^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(indirect_structural_match)] on by default
7+
note: lint level defined here
8+
--> $DIR/cant-hide-behind-indirect-struct-param.rs:7:9
9+
|
10+
LL | #![warn(indirect_structural_match)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
812
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
913
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
1014

src/test/ui/rfc1445/issue-62307-match-ref-ref-forbidden-without-eq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Issue 62307 pointed out a case where the checking for
1212
// `#[structural_match]` was too shallow.
13-
13+
#![warn(indirect_structural_match)]
1414
// run-pass
1515

1616
#[derive(Debug)]

src/test/ui/rfc1445/issue-62307-match-ref-ref-forbidden-without-eq.stderr

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ warning: to use a constant of type `B` in a pattern, `B` must be annotated with
44
LL | RR_B1 => { println!("CLAIM RR0: {:?} matches {:?}", RR_B1, RR_B0); }
55
| ^^^^^
66
|
7-
= note: #[warn(indirect_structural_match)] on by default
7+
note: lint level defined here
8+
--> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:13:9
9+
|
10+
LL | #![warn(indirect_structural_match)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
812
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
913
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
1014

0 commit comments

Comments
 (0)