2024-03-30 12:57:54 -05:00
|
|
|
error[E0308]: mismatched types
|
2024-04-02 10:54:29 -05:00
|
|
|
--> $DIR/feature-gate-ref_pat_everywhere.rs:2:22
|
2024-03-30 12:57:54 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(Some(&x)) = &Some(&Some(0)) {
|
|
|
|
| ^^ --------------- this expression has type `&Option<&Option<{integer}>>`
|
|
|
|
| |
|
|
|
|
| expected integer, found `&_`
|
|
|
|
|
|
|
|
|
= note: expected type `{integer}`
|
|
|
|
found reference `&_`
|
|
|
|
help: consider removing `&` from the pattern
|
|
|
|
|
|
|
|
|
LL | if let Some(Some(x)) = &Some(&Some(0)) {
|
|
|
|
| ~
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-04-02 10:54:29 -05:00
|
|
|
--> $DIR/feature-gate-ref_pat_everywhere.rs:6:17
|
2024-03-30 12:57:54 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(&Some(x)) = &Some(Some(0)) {
|
|
|
|
| ^^^^^^^^ -------------- this expression has type `&Option<Option<{integer}>>`
|
|
|
|
| |
|
|
|
|
| expected `Option<{integer}>`, found `&_`
|
|
|
|
|
|
|
|
|
= note: expected enum `Option<{integer}>`
|
|
|
|
found reference `&_`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2024-04-02 10:54:29 -05:00
|
|
|
--> $DIR/feature-gate-ref_pat_everywhere.rs:10:22
|
2024-03-30 12:57:54 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(Some(&mut x)) = &mut Some(&mut Some(0)) {
|
|
|
|
| ^^^^^^ ----------------------- this expression has type `&mut Option<&mut Option<{integer}>>`
|
|
|
|
| |
|
|
|
|
| expected integer, found `&mut _`
|
|
|
|
|
|
|
|
|
= note: expected type `{integer}`
|
|
|
|
found mutable reference `&mut _`
|
|
|
|
note: to declare a mutable binding use: `mut x`
|
2024-04-02 10:54:29 -05:00
|
|
|
--> $DIR/feature-gate-ref_pat_everywhere.rs:10:22
|
2024-03-30 12:57:54 -05:00
|
|
|
|
|
|
|
|
LL | if let Some(Some(&mut x)) = &mut Some(&mut Some(0)) {
|
|
|
|
| ^^^^^^
|
|
|
|
help: consider removing `&mut` from the pattern
|
|
|
|
|
|
|
|
|
LL | if let Some(Some(x)) = &mut Some(&mut Some(0)) {
|
|
|
|
| ~
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|