]> git.lizzy.rs Git - rust.git/blob - tests/ui/needless_option_as_deref.stderr
Don't lint `if_same_then_else` with `if let` conditions
[rust.git] / tests / ui / needless_option_as_deref.stderr
1 error: derefed type is same as origin
2   --> $DIR/needless_option_as_deref.rs:7:29
3    |
4 LL |     let _: Option<&usize> = Some(&1).as_deref();
5    |                             ^^^^^^^^^^^^^^^^^^^ help: try this: `Some(&1)`
6    |
7    = note: `-D clippy::needless-option-as-deref` implied by `-D warnings`
8
9 error: derefed type is same as origin
10   --> $DIR/needless_option_as_deref.rs:8:33
11    |
12 LL |     let _: Option<&mut usize> = Some(&mut 1).as_deref_mut();
13    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `Some(&mut 1)`
14
15 error: aborting due to 2 previous errors
16