You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= note: `-D clippy::panic-in-result` implied by `-D warnings`
10
+
= note: `-D clippy::panic-in-result-fn` implied by `-D warnings`
11
11
= help: `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
12
12
note: return Err() instead of panicking
13
-
--> $DIR/panic_in_result.rs:8:9
13
+
--> $DIR/panic_in_result_fn.rs:8:9
14
14
|
15
15
LL | panic!("error");
16
16
| ^^^^^^^^^^^^^^^^
17
17
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
18
18
19
19
error: used `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` in a function that returns `Result`
= help: `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
29
29
note: return Err() instead of panicking
30
-
--> $DIR/panic_in_result.rs:13:9
30
+
--> $DIR/panic_in_result_fn.rs:13:9
31
31
|
32
32
LL | unimplemented!();
33
33
| ^^^^^^^^^^^^^^^^^
34
34
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
35
35
36
36
error: used `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` in a function that returns `Result`
= help: `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
46
46
note: return Err() instead of panicking
47
-
--> $DIR/panic_in_result.rs:18:9
47
+
--> $DIR/panic_in_result_fn.rs:18:9
48
48
|
49
49
LL | unreachable!();
50
50
| ^^^^^^^^^^^^^^^
51
51
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
52
52
53
53
error: used `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` in a function that returns `Result`
= help: `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
63
63
note: return Err() instead of panicking
64
-
--> $DIR/panic_in_result.rs:23:9
64
+
--> $DIR/panic_in_result_fn.rs:23:9
65
65
|
66
66
LL | todo!("Finish this");
67
67
| ^^^^^^^^^^^^^^^^^^^^^
68
68
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
69
69
70
70
error: used `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` in a function that returns `Result`
= help: `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
80
80
note: return Err() instead of panicking
81
-
--> $DIR/panic_in_result.rs:54:5
81
+
--> $DIR/panic_in_result_fn.rs:54:5
82
82
|
83
83
LL | panic!("error");
84
84
| ^^^^^^^^^^^^^^^^
85
85
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
86
86
87
87
error: used `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` in a function that returns `Result`
88
-
--> $DIR/panic_in_result.rs:67:1
88
+
--> $DIR/panic_in_result_fn.rs:67:1
89
89
|
90
90
LL | / fn main() -> Result<(), String> {
91
91
LL | | todo!("finish main method");
@@ -95,7 +95,7 @@ LL | | }
95
95
|
96
96
= help: `unimplemented!()`, `unreachable!()`, `todo!()` or `panic!()` should not be used in a function that returns `Result` as `Result` is expected to return an error instead of crashing
0 commit comments