2021-08-24 09:06:46 -05:00
|
|
|
error: derefed type is same as origin
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_option_as_deref.rs:7:29
|
2021-08-24 09:06:46 -05:00
|
|
|
|
|
|
|
|
LL | let _: Option<&usize> = Some(&1).as_deref();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `Some(&1)`
|
2021-08-24 09:06:46 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-option-as-deref` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: derefed type is same as origin
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_option_as_deref.rs:8:33
|
2021-08-24 09:06:46 -05:00
|
|
|
|
|
|
|
|
LL | let _: Option<&mut usize> = Some(&mut 1).as_deref_mut();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(&mut 1)`
|
2021-08-24 09:06:46 -05:00
|
|
|
|
2022-04-06 09:35:49 -05:00
|
|
|
error: derefed type is same as origin
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/needless_option_as_deref.rs:12:13
|
2022-04-06 09:35:49 -05:00
|
|
|
|
|
|
|
|
LL | let _ = x.as_deref_mut();
|
2023-07-01 06:08:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `x`
|
2022-04-06 09:35:49 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2021-08-24 09:06:46 -05:00
|
|
|
|