]> git.lizzy.rs Git - rust.git/blob - tests/ui/or_then_unwrap.stderr
refactor: rename lint to or_then_unwrap
[rust.git] / tests / ui / or_then_unwrap.stderr
1 error: .or(Some(…)).unwrap() found
2   --> $DIR/or_then_unwrap.rs:22:20
3    |
4 LL |     let _ = option.or(Some("fallback")).unwrap(); // should trigger lint
5    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::or-then-unwrap` implied by `-D warnings`
8    = help: use `unwrap_or()` instead
9
10 error: .or(Ok(…)).unwrap() found
11   --> $DIR/or_then_unwrap.rs:25:20
12    |
13 LL |     let _ = result.or::<&str>(Ok("fallback")).unwrap(); // should trigger lint
14    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = help: use `unwrap_or()` instead
17
18 error: aborting due to 2 previous errors
19