2024-12-23 18:38:14 -08:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
--> $DIR/pattern-errors.rs:15:17
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&mut x) = &Some(&mut 0) {
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
|
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&x) = &Some(&mut 0) {
|
|
|
|
|
| ~
|
|
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
--> $DIR/pattern-errors.rs:19:17
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&mut Some(&x)) = &Some(&mut Some(0)) {
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
|
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&Some(&x)) = &Some(&mut Some(0)) {
|
|
|
|
|
| ~
|
|
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
--> $DIR/pattern-errors.rs:23:22
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(Some(&mut x)) = &Some(Some(&mut 0)) {
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
|
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(Some(&x)) = &Some(Some(&mut 0)) {
|
|
|
|
|
| ~
|
|
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
--> $DIR/pattern-errors.rs:28:17
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&mut Some(&_)) = &Some(&Some(0)) {
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
|
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&Some(&_)) = &Some(&Some(0)) {
|
|
|
|
|
| ~
|
|
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
--> $DIR/pattern-errors.rs:34:23
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&Some(&mut _)) = &mut Some(&Some(0)) {
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
|
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&Some(&_)) = &mut Some(&Some(0)) {
|
|
|
|
|
| ~
|
|
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
--> $DIR/pattern-errors.rs:40:17
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&mut Some(x)) = &Some(Some(0)) {
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
|
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&Some(x)) = &Some(Some(0)) {
|
|
|
|
|
| ~
|
|
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
|
--> $DIR/pattern-errors.rs:43:17
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&mut Some(x)) = &Some(Some(0)) {
|
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
|
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
|
|
|
|
|
|
LL | if let Some(&Some(x)) = &Some(Some(0)) {
|
|
|
|
|
| ~
|
|
|
|
|
|
2025-01-02 21:47:54 -08:00
|
|
|
error: aborting due to 7 previous errors
|
2024-12-23 18:38:14 -08:00
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|