Skip to content

Commit 8b2c687

Browse files
Adjust clippy tests to account for unreachable! changes
1 parent 22f1800 commit 8b2c687

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/tools/clippy/tests/ui/panic_in_result_fn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ note: return Err() instead of panicking
4848
|
4949
LL | unreachable!();
5050
| ^^^^^^^^^^^^^^
51-
= note: this error originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
51+
= note: this error originates in the macro `$crate::panic::unreachable_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
5252

5353
error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
5454
--> $DIR/panic_in_result_fn.rs:21:5

src/tools/clippy/tests/ui/panicking_macros.stderr

+2-5
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,22 @@ LL | unreachable!();
7575
| ^^^^^^^^^^^^^^
7676
|
7777
= note: `-D clippy::unreachable` implied by `-D warnings`
78-
= note: this error originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
7978

8079
error: usage of the `unreachable!` macro
8180
--> $DIR/panicking_macros.rs:33:5
8281
|
8382
LL | unreachable!("message");
8483
| ^^^^^^^^^^^^^^^^^^^^^^^
8584
|
86-
= note: this error originates in the macro `$crate::unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
85+
= note: this error originates in the macro `$crate::panic::unreachable_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
8786

8887
error: usage of the `unreachable!` macro
8988
--> $DIR/panicking_macros.rs:34:5
9089
|
9190
LL | unreachable!("{} {}", "panic with", "multiple arguments");
9291
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9392
|
94-
= note: this error originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
93+
= note: this error originates in the macro `$crate::panic::unreachable_2021` (in Nightly builds, run with -Z macro-backtrace for more info)
9594

9695
error: `panic` should not be present in production code
9796
--> $DIR/panicking_macros.rs:40:5
@@ -120,8 +119,6 @@ error: usage of the `unreachable!` macro
120119
|
121120
LL | unreachable!();
122121
| ^^^^^^^^^^^^^^
123-
|
124-
= note: this error originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
125122

126123
error: aborting due to 16 previous errors
127124

0 commit comments

Comments
 (0)