1 error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
2 --> $DIR/panic_in_result_fn.rs:7:5
4 LL | / fn result_with_panic() -> Result<bool, String> // should emit lint
6 LL | | panic!("error");
10 = note: `-D clippy::panic-in-result-fn` implied by `-D warnings`
11 = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
12 note: return Err() instead of panicking
13 --> $DIR/panic_in_result_fn.rs:9:9
17 = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
19 error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
20 --> $DIR/panic_in_result_fn.rs:12:5
22 LL | / fn result_with_unimplemented() -> Result<bool, String> // should emit lint
24 LL | | unimplemented!();
28 = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
29 note: return Err() instead of panicking
30 --> $DIR/panic_in_result_fn.rs:14:9
32 LL | unimplemented!();
34 = note: this error originates in the macro `unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info)
36 error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
37 --> $DIR/panic_in_result_fn.rs:17:5
39 LL | / fn result_with_unreachable() -> Result<bool, String> // should emit lint
41 LL | | unreachable!();
45 = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
46 note: return Err() instead of panicking
47 --> $DIR/panic_in_result_fn.rs:19:9
51 = note: this error originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
53 error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
54 --> $DIR/panic_in_result_fn.rs:22:5
56 LL | / fn result_with_todo() -> Result<bool, String> // should emit lint
58 LL | | todo!("Finish this");
62 = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
63 note: return Err() instead of panicking
64 --> $DIR/panic_in_result_fn.rs:24:9
66 LL | todo!("Finish this");
67 | ^^^^^^^^^^^^^^^^^^^^^
68 = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
70 error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
71 --> $DIR/panic_in_result_fn.rs:53:1
73 LL | / fn function_result_with_panic() -> Result<bool, String> // should emit lint
75 LL | | panic!("error");
79 = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
80 note: return Err() instead of panicking
81 --> $DIR/panic_in_result_fn.rs:55:5
85 = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
87 error: used `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertion in a function that returns `Result`
88 --> $DIR/panic_in_result_fn.rs:68:1
90 LL | / fn main() -> Result<(), String> {
91 LL | | todo!("finish main method");
96 = help: `unimplemented!()`, `unreachable!()`, `todo!()`, `panic!()` or assertions should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
97 note: return Err() instead of panicking
98 --> $DIR/panic_in_result_fn.rs:69:5
100 LL | todo!("finish main method");
101 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102 = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)
104 error: aborting due to 6 previous errors