]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/needless_option_as_deref.stderr
Rollup merge of #102072 - scottmcm:ptr-alignment-type, r=thomcc
[rust.git] / src / tools / clippy / tests / ui / needless_option_as_deref.stderr
1 error: derefed type is same as origin
2   --> $DIR/needless_option_as_deref.rs:8: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:9:33
11    |
12 LL |     let _: Option<&mut usize> = Some(&mut 1).as_deref_mut();
13    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `Some(&mut 1)`
14
15 error: derefed type is same as origin
16   --> $DIR/needless_option_as_deref.rs:13:13
17    |
18 LL |     let _ = x.as_deref_mut();
19    |             ^^^^^^^^^^^^^^^^ help: try this: `x`
20
21 error: aborting due to 3 previous errors
22