]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unnecessary_lazy_eval_unfixable.stderr
Rollup merge of #102454 - chenyukang:fix-102396-missing-parentheses, r=lcnr
[rust.git] / src / tools / clippy / tests / ui / unnecessary_lazy_eval_unfixable.stderr
1 error: unnecessary closure used to substitute value for `Result::Err`
2   --> $DIR/unnecessary_lazy_eval_unfixable.rs:12:13
3    |
4 LL |     let _ = Ok(1).unwrap_or_else(|()| 2);
5    |             ^^^^^^----------------------
6    |                   |
7    |                   help: use `unwrap_or(..)` instead: `unwrap_or(2)`
8    |
9    = note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
10
11 error: unnecessary closure used to substitute value for `Result::Err`
12   --> $DIR/unnecessary_lazy_eval_unfixable.rs:16:13
13    |
14 LL |     let _ = Ok(1).unwrap_or_else(|e::E| 2);
15    |             ^^^^^^------------------------
16    |                   |
17    |                   help: use `unwrap_or(..)` instead: `unwrap_or(2)`
18
19 error: unnecessary closure used to substitute value for `Result::Err`
20   --> $DIR/unnecessary_lazy_eval_unfixable.rs:17:13
21    |
22 LL |     let _ = Ok(1).unwrap_or_else(|SomeStruct { .. }| 2);
23    |             ^^^^^^-------------------------------------
24    |                   |
25    |                   help: use `unwrap_or(..)` instead: `unwrap_or(2)`
26
27 error: aborting due to 3 previous errors
28