Skip to content

Commit

Permalink
Turn indirect_structural_match lint on explicitly in ui tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Jul 12, 2019
1 parent 1b1b538 commit 00e0d87
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 13 deletions.
2 changes: 1 addition & 1 deletion 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>>;
}
Expand Down
6 changes: 5 additions & 1 deletion src/test/ui/issues/issue-55511.stderr
Expand Up @@ -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>

Expand Down
Expand Up @@ -4,7 +4,7 @@
// through that we had intended to reject.
//
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339

#![warn(indirect_structural_match)]
struct NoDerive(i32);

// This impl makes NoDerive irreflexive.
Expand Down
Expand Up @@ -4,7 +4,7 @@
// through that we had intended to reject.
//
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339

#![warn(indirect_structural_match)]
// run-pass

struct NoDerive(i32);
Expand Down
Expand Up @@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
LL | WRAP_DOUBLY_INDIRECT_INLINE => { panic!("WRAP_DOUBLY_INDIRECT_INLINE matched itself"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(indirect_structural_match)] on by default
note: lint level defined here
--> $DIR/cant-hide-behind-doubly-indirect-embedded.rs:7: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>

Expand Up @@ -4,7 +4,7 @@
// through that we had intended to reject.
//
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339

#![warn(indirect_structural_match)]
// run-pass

struct NoDerive(i32);
Expand Down
Expand Up @@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
LL | WRAP_DOUBLY_INDIRECT_PARAM => { panic!("WRAP_DOUBLY_INDIRECT_PARAM matched itself"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(indirect_structural_match)] on by default
note: lint level defined here
--> $DIR/cant-hide-behind-doubly-indirect-param.rs:7: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>

Expand Up @@ -4,7 +4,7 @@
// through that we had intended to reject.
//
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339

#![warn(indirect_structural_match)]
// run-pass

struct NoDerive(i32);
Expand Down
Expand Up @@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
LL | WRAP_INDIRECT_INLINE => { panic!("WRAP_INDIRECT_INLINE matched itself"); }
| ^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(indirect_structural_match)] on by default
note: lint level defined here
--> $DIR/cant-hide-behind-indirect-struct-embedded.rs:7: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>

Expand Up @@ -4,7 +4,7 @@
// through that we had intended to reject.
//
// See discussion on rust-lang/rust#62307 and rust-lang/rust#62339

#![warn(indirect_structural_match)]
// run-pass

struct NoDerive(i32);
Expand Down
Expand Up @@ -4,7 +4,11 @@ warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be a
LL | WRAP_INDIRECT_PARAM => { panic!("WRAP_INDIRECT_PARAM matched itself"); }
| ^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(indirect_structural_match)] on by default
note: lint level defined here
--> $DIR/cant-hide-behind-indirect-struct-param.rs:7: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>

Expand Up @@ -10,7 +10,7 @@

// Issue 62307 pointed out a case where the checking for
// `#[structural_match]` was too shallow.

#![warn(indirect_structural_match)]
// run-pass

#[derive(Debug)]
Expand Down
Expand Up @@ -4,7 +4,11 @@ warning: to use a constant of type `B` in a pattern, `B` must be annotated with
LL | RR_B1 => { println!("CLAIM RR0: {:?} matches {:?}", RR_B1, RR_B0); }
| ^^^^^
|
= note: #[warn(indirect_structural_match)] on by default
note: lint level defined here
--> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:13: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>

Expand Down

0 comments on commit 00e0d87

Please sign in to comment.