134 lines
3.6 KiB
Plaintext
134 lines
3.6 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:14: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(&mut x) = &Some(&mut 0) {
|
|
LL + if let Some(&x) = &Some(&mut 0) {
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:20: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(&mut Some(&x)) = &Some(&mut Some(0)) {
|
|
LL + if let Some(&Some(&x)) = &Some(&mut Some(0)) {
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:26: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(&mut x)) = &Some(Some(&mut 0)) {
|
|
LL + if let Some(Some(&x)) = &Some(Some(&mut 0)) {
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:33: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(&mut Some(&_)) = &Some(&Some(0)) {
|
|
LL + if let Some(&Some(&_)) = &Some(&Some(0)) {
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:45: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 _)) = &mut Some(&Some(0)) {
|
|
LL + if let Some(&Some(&_)) = &mut Some(&Some(0)) {
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:56: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(&mut Some(x)) = &Some(Some(0)) {
|
|
LL + if let Some(&Some(x)) = &Some(Some(0)) {
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:158:10
|
|
|
|
|
LL | let [&mut x] = &[&mut 0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let [&mut x] = &[&mut 0];
|
|
LL + let [&x] = &[&mut 0];
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:164:10
|
|
|
|
|
LL | let [&mut &x] = &[&mut 0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let [&mut &x] = &[&mut 0];
|
|
LL + let [&&x] = &[&mut 0];
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:170:10
|
|
|
|
|
LL | let [&mut &ref x] = &[&mut 0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let [&mut &ref x] = &[&mut 0];
|
|
LL + let [&&ref x] = &[&mut 0];
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:176:10
|
|
|
|
|
LL | let [&mut &(mut x)] = &[&mut 0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let [&mut &(mut x)] = &[&mut 0];
|
|
LL + let [&&(mut x)] = &[&mut 0];
|
|
|
|
|
|
|
error: aborting due to 10 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|