mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
show indirect_structural_match and pointer_structural_match in future compat reports
This commit is contained in:
parent
9f58cf43c7
commit
48abca761a
@ -2282,7 +2282,7 @@ declare_lint! {
|
||||
Warn,
|
||||
"constant used in pattern contains value of non-structural-match type in a field or a variant",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
|
||||
reference: "issue #62411 <https://github.com/rust-lang/rust/issues/62411>",
|
||||
};
|
||||
}
|
||||
@ -2338,7 +2338,7 @@ declare_lint! {
|
||||
Warn,
|
||||
"pointers are not structural-match",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
|
||||
reference: "issue #62411 <https://github.com/rust-lang/rust/issues/70861>",
|
||||
};
|
||||
}
|
||||
|
@ -10,3 +10,14 @@ LL | NUMBER_POINTER => (),
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/match-edge-cases_1.rs:29:13
|
||||
|
|
||||
LL | NUMBER_POINTER => (),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
|
@ -41,3 +41,63 @@ LL | STR => {}
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:10:9
|
||||
|
|
||||
LL | C => {}
|
||||
| ^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:1:9
|
||||
|
|
||||
LL | #![deny(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Future breakage diagnostic:
|
||||
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:18:9
|
||||
|
|
||||
LL | C_INNER => {}
|
||||
| ^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:1:9
|
||||
|
|
||||
LL | #![deny(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Future breakage diagnostic:
|
||||
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:30:9
|
||||
|
|
||||
LL | D => {}
|
||||
| ^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:1:9
|
||||
|
|
||||
LL | #![deny(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Future breakage diagnostic:
|
||||
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:36:9
|
||||
|
|
||||
LL | STR => {}
|
||||
| ^^^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:1:9
|
||||
|
|
||||
LL | #![deny(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -23,3 +23,33 @@ LL | BAR => println!("bar"),
|
||||
|
||||
warning: 2 warnings emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-44333.rs:19:9
|
||||
|
|
||||
LL | FOO => println!("foo"),
|
||||
| ^^^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-44333.rs:3:9
|
||||
|
|
||||
LL | #![warn(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-44333.rs:21:9
|
||||
|
|
||||
LL | BAR => println!("bar"),
|
||||
| ^^^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-44333.rs:3:9
|
||||
|
|
||||
LL | #![warn(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -97,3 +97,20 @@ LL | #![warn(indirect_structural_match)]
|
||||
|
||||
error: aborting due to 9 previous errors; 1 warning emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/reject_non_structural.rs:98:29
|
||||
|
|
||||
LL | match &Some(NoDerive) { ADDR_OF => dbg!(ADDR_OF), _ => panic!("whoops"), };
|
||||
| ^^^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/reject_non_structural.rs:14:9
|
||||
|
|
||||
LL | #![warn(indirect_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -9,3 +9,21 @@ LL | if let CONSTANT = &&MyType {
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: to use a constant of type `MyType` in a pattern, `MyType` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/const-partial_eq-fallback-ice.rs:14:12
|
||||
|
|
||||
LL | if let CONSTANT = &&MyType {
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/const-partial_eq-fallback-ice.rs:1:10
|
||||
|
|
||||
LL | #![allow(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: `#[allow(indirect_structural_match)]` implied by `#[allow(warnings)]`
|
||||
|
||||
|
@ -166,3 +166,91 @@ LL | WRAPQUUX => {}, Wrap(_) => todo!()
|
||||
error: aborting due to 10 previous errors; 8 warnings emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0004`.
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:96:9
|
||||
|
|
||||
LL | QUUX => {}
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:98:9
|
||||
|
|
||||
LL | QUUX => {}
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:108:9
|
||||
|
|
||||
LL | WRAPQUUX => {}
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:110:9
|
||||
|
|
||||
LL | WRAPQUUX => {}
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:117:9
|
||||
|
|
||||
LL | WRAPQUUX => {}
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:127:9
|
||||
|
|
||||
LL | WRAPQUUX => {}
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:139:9
|
||||
|
|
||||
LL | WHOKNOWSQUUX => {}
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/consts-opaque.rs:142:9
|
||||
|
|
||||
LL | WHOKNOWSQUUX => {}
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
|
@ -16,3 +16,20 @@ LL | #![warn(indirect_structural_match)]
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/cant-hide-behind-doubly-indirect-embedded.rs:24:9
|
||||
|
|
||||
LL | WRAP_DOUBLY_INDIRECT_INLINE => { panic!("WRAP_DOUBLY_INDIRECT_INLINE matched itself"); }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/cant-hide-behind-doubly-indirect-embedded.rs:7:9
|
||||
|
|
||||
LL | #![warn(indirect_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -16,3 +16,20 @@ LL | #![warn(indirect_structural_match)]
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/cant-hide-behind-doubly-indirect-param.rs:24:9
|
||||
|
|
||||
LL | WRAP_DOUBLY_INDIRECT_PARAM => { panic!("WRAP_DOUBLY_INDIRECT_PARAM matched itself"); }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/cant-hide-behind-doubly-indirect-param.rs:7:9
|
||||
|
|
||||
LL | #![warn(indirect_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -16,3 +16,20 @@ LL | #![warn(indirect_structural_match)]
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/cant-hide-behind-indirect-struct-embedded.rs:24:9
|
||||
|
|
||||
LL | WRAP_INDIRECT_INLINE => { panic!("WRAP_INDIRECT_INLINE matched itself"); }
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/cant-hide-behind-indirect-struct-embedded.rs:7:9
|
||||
|
|
||||
LL | #![warn(indirect_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -16,3 +16,20 @@ LL | #![warn(indirect_structural_match)]
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/cant-hide-behind-indirect-struct-param.rs:24:9
|
||||
|
|
||||
LL | WRAP_INDIRECT_PARAM => { panic!("WRAP_INDIRECT_PARAM matched itself"); }
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/cant-hide-behind-indirect-struct-param.rs:7:9
|
||||
|
|
||||
LL | #![warn(indirect_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -91,3 +91,113 @@ LL | CFOO => count += 1,
|
||||
|
||||
warning: 10 warnings emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:43:14
|
||||
|
|
||||
LL | Wrap(CFN1) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:52:14
|
||||
|
|
||||
LL | Wrap(CFN2) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:61:14
|
||||
|
|
||||
LL | Wrap(CFN3) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:70:14
|
||||
|
|
||||
LL | Wrap(CFN4) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:79:14
|
||||
|
|
||||
LL | Wrap(CFN5) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:88:14
|
||||
|
|
||||
LL | Wrap(CFN6) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:97:14
|
||||
|
|
||||
LL | Wrap(CFN7) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:106:14
|
||||
|
|
||||
LL | Wrap(CFN8) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:115:14
|
||||
|
|
||||
LL | Wrap(CFN9) => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/fn-ptr-is-structurally-matchable.rs:138:9
|
||||
|
|
||||
LL | CFOO => count += 1,
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
= note: `#[warn(pointer_structural_match)]` on by default
|
||||
|
||||
|
@ -27,3 +27,37 @@ LL | RR_B1 => { println!("CLAIM RR1: {:?} matches {:?}", RR_B1, RR_B1);
|
||||
|
||||
warning: 2 warnings emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: to use a constant of type `B` in a pattern, `B` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:31:9
|
||||
|
|
||||
LL | RR_B1 => { println!("CLAIM RR0: {:?} matches {:?}", RR_B1, RR_B0); }
|
||||
| ^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:13:9
|
||||
|
|
||||
LL | #![warn(indirect_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: to use a constant of type `B` in a pattern, `B` must be annotated with `#[derive(PartialEq)]`
|
||||
--> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:38:9
|
||||
|
|
||||
LL | RR_B1 => { println!("CLAIM RR1: {:?} matches {:?}", RR_B1, RR_B1); }
|
||||
| ^^^^^
|
||||
|
|
||||
= 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>
|
||||
= note: the traits must be derived, manual `impl`s are not sufficient
|
||||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-62307-match-ref-ref-forbidden-without-eq.rs:13:9
|
||||
|
|
||||
LL | #![warn(indirect_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -23,3 +23,33 @@ LL | TEST2 => println!("matched"),
|
||||
|
||||
warning: 2 warnings emitted
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-63479-match-fnptr.rs:36:7
|
||||
|
|
||||
LL | B(TEST) => println!("matched"),
|
||||
| ^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-63479-match-fnptr.rs:8:9
|
||||
|
|
||||
LL | #![warn(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon. See https://github.com/rust-lang/rust/issues/70861 for details.
|
||||
--> $DIR/issue-63479-match-fnptr.rs:42:5
|
||||
|
|
||||
LL | TEST2 => println!("matched"),
|
||||
| ^^^^^
|
||||
|
|
||||
= 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/70861>
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-63479-match-fnptr.rs:8:9
|
||||
|
|
||||
LL | #![warn(pointer_structural_match)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user