2021-08-24 14:06:46 +00:00
|
|
|
error: derefed type is same as origin
|
2023-06-06 20:56:57 +00:00
|
|
|
--> $DIR/needless_option_as_deref.rs:9:29
|
2021-08-24 14:06:46 +00:00
|
|
|
|
|
|
|
|
LL | let _: Option<&usize> = Some(&1).as_deref();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try this: `Some(&1)`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-option-as-deref` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: derefed type is same as origin
|
2023-06-06 20:56:57 +00:00
|
|
|
--> $DIR/needless_option_as_deref.rs:10:33
|
2021-08-24 14:06:46 +00:00
|
|
|
|
|
|
|
|
LL | let _: Option<&mut usize> = Some(&mut 1).as_deref_mut();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `Some(&mut 1)`
|
|
|
|
|
2022-04-06 14:35:49 +00:00
|
|
|
error: derefed type is same as origin
|
2023-06-06 20:56:57 +00:00
|
|
|
--> $DIR/needless_option_as_deref.rs:14:13
|
2022-04-06 14:35:49 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.as_deref_mut();
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try this: `x`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2021-08-24 14:06:46 +00:00
|
|
|
|