Skip to content

Commit

Permalink
Adjust clippy tests to account for unreachable! changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Feb 12, 2022
1 parent 22f1800 commit 8b2c687
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/tools/clippy/tests/ui/panic_in_result_fn.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ note: return Err() instead of panicking
|
LL | unreachable!();
| ^^^^^^^^^^^^^^
= note: this error originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::unreachable_2021` (in Nightly builds, run with -Z macro-backtrace for more info)

error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
--> $DIR/panic_in_result_fn.rs:21:5
Expand Down
7 changes: 2 additions & 5 deletions src/tools/clippy/tests/ui/panicking_macros.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,22 @@ LL | unreachable!();
| ^^^^^^^^^^^^^^
|
= note: `-D clippy::unreachable` implied by `-D warnings`
= note: this error originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)

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

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

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

error: aborting due to 16 previous errors

0 comments on commit 8b2c687

Please sign in to comment.