2021-09-08 14:31:47 +00:00
|
|
|
error: derefed type is same as origin
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/needless_option_as_deref.rs:9:29
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
LL | let _: Option<&usize> = Some(&1).as_deref();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `Some(&1)`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-option-as-deref` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: derefed type is same as origin
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/needless_option_as_deref.rs:10:33
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
LL | let _: Option<&mut usize> = Some(&mut 1).as_deref_mut();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Some(&mut 1)`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
2022-04-07 17:39:59 +00:00
|
|
|
error: derefed type is same as origin
|
2023-07-02 12:35:19 +00:00
|
|
|
--> $DIR/needless_option_as_deref.rs:14:13
|
2022-04-07 17:39:59 +00:00
|
|
|
|
|
|
|
|
LL | let _ = x.as_deref_mut();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `x`
|
2022-04-07 17:39:59 +00:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2021-09-08 14:31:47 +00:00
|
|
|
|