rust-clippy/tests/ui/expect.stderr

28 lines
706 B
Text
Raw Normal View History

error: used `expect()` on an `Option` value
2023-05-31 17:47:10 +00:00
--> $DIR/expect.rs:6:13
2019-10-16 17:43:26 +00:00
|
LL | let _ = opt.expect("");
| ^^^^^^^^^^^^^^
|
2023-08-02 18:57:06 +00:00
= note: if this value is `None`, it will panic
2022-09-22 16:04:22 +00:00
= note: `-D clippy::expect-used` implied by `-D warnings`
2019-10-16 17:43:26 +00:00
error: used `expect()` on a `Result` value
2023-05-31 17:47:10 +00:00
--> $DIR/expect.rs:11:13
2019-10-16 17:43:26 +00:00
|
LL | let _ = res.expect("");
| ^^^^^^^^^^^^^^
|
2023-08-02 18:57:06 +00:00
= note: if this value is an `Err`, it will panic
2019-10-16 17:43:26 +00:00
error: used `expect_err()` on a `Result` value
2023-05-31 17:47:10 +00:00
--> $DIR/expect.rs:12:13
|
LL | let _ = res.expect_err("");
| ^^^^^^^^^^^^^^^^^^
|
2023-08-02 18:57:06 +00:00
= note: if this value is an `Ok`, it will panic
error: aborting due to 3 previous errors
2019-10-16 17:43:26 +00:00