-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
turn pointer_structural_match into a hard error
- Loading branch information
Showing
23 changed files
with
131 additions
and
811 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
tests/ui/closures/2229_closure_analysis/match/match-edge-cases_1.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 4 additions & 81 deletions
85
tests/ui/consts/const_in_pattern/issue-34784-match-on-non-int-raw-ptr.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,26 @@ | ||
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 | ||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:9: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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
note: the lint level is defined here | ||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:1:9 | ||
| | ||
LL | #![deny(pointer_structural_match)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
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 | ||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:16: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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
|
||
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 | ||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:27: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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
|
||
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 | ||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:32: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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
|
||
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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
note: the lint level is defined here | ||
--> $DIR/issue-34784-match-on-non-int-raw-ptr.rs:1:9 | ||
| | ||
LL | #![deny(pointer_structural_match)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,14 @@ | ||
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 | ||
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-44333.rs:15: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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
note: the lint level is defined here | ||
--> $DIR/issue-44333.rs:3:9 | ||
| | ||
LL | #![warn(pointer_structural_match)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
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 | ||
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-44333.rs:16: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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
|
||
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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
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 #120362 <https://github.com/rust-lang/rust/issues/120362> | ||
note: the lint level is defined here | ||
--> $DIR/issue-44333.rs:3:9 | ||
| | ||
LL | #![warn(pointer_structural_match)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
error: aborting due to 2 previous errors | ||
|
Oops, something went wrong.