2021-09-08 09:31:47 -05:00
|
|
|
error: derefed type is same as origin
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_option_as_deref.rs:7:29
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
LL | let _: Option<&usize> = Some(&1).as_deref();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `Some(&1)`
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-option-as-deref` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::needless_option_as_deref)]`
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
error: derefed type is same as origin
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_option_as_deref.rs:8:33
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
LL | let _: Option<&mut usize> = Some(&mut 1).as_deref_mut();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(&mut 1)`
|
2021-09-08 09:31:47 -05:00
|
|
|
|
2022-04-07 12:39:59 -05:00
|
|
|
error: derefed type is same as origin
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_option_as_deref.rs:12:13
|
2022-04-07 12:39:59 -05:00
|
|
|
|
|
|
|
|
LL | let _ = x.as_deref_mut();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `x`
|
2022-04-07 12:39:59 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2021-09-08 09:31:47 -05:00
|
|
|
|