rust/tests/ui/use_unwrap_or.stderr
2022-03-17 18:57:28 +01:00

20 lines
617 B
Plaintext

error: .or(Some(…)).unwrap() found
--> $DIR/use_unwrap_or.rs:11:20
|
LL | let _ = option.or(Some("fallback")).unwrap(); // should trigger lint
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::use-unwrap-or` implied by `-D warnings`
= help: use `unwrap_or()` instead
error: .or(Ok(…)).unwrap() found
--> $DIR/use_unwrap_or.rs:14:20
|
LL | let _ = result.or::<&str>(Ok("fallback")).unwrap(); // should trigger lint
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use `unwrap_or()` instead
error: aborting due to 2 previous errors