246 lines
6.8 KiB
Plaintext
246 lines
6.8 KiB
Plaintext
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:38:23
|
|
|
|
|
LL | if let Some(&Some(&mut x)) = &Some(&mut Some(0)) {
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - if let Some(&Some(&mut x)) = &Some(&mut Some(0)) {
|
|
LL + if let Some(&Some(&x)) = &Some(&mut 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:50:28
|
|
|
|
|
LL | if let Some(&Some(Some(&mut x))) = &Some(Some(&mut Some(0))) {
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - if let Some(&Some(Some(&mut x))) = &Some(Some(&mut Some(0))) {
|
|
LL + if let Some(&Some(Some(&x))) = &Some(Some(&mut 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:64:11
|
|
|
|
|
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:70:11
|
|
|
|
|
LL | let &[&mut x] = &mut &mut [0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let &[&mut x] = &mut &mut [0];
|
|
LL + let &[&x] = &mut &mut [0];
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:76:11
|
|
|
|
|
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:82:11
|
|
|
|
|
LL | let &[&mut ref x] = &mut &mut [0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let &[&mut ref x] = &mut &mut [0];
|
|
LL + let &[&ref x] = &mut &mut [0];
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:88:11
|
|
|
|
|
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[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:94:11
|
|
|
|
|
LL | let &[&mut mut x] = &mut &mut [0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let &[&mut mut x] = &mut &mut [0];
|
|
LL + let &[&mut x] = &mut &mut [0];
|
|
|
|
|
|
|
error[E0658]: binding cannot be both mutable and by-reference
|
|
--> $DIR/pattern-errors.rs:102:12
|
|
|
|
|
LL | let [&(mut x)] = &[&0];
|
|
| ^^^^
|
|
|
|
|
= note: see issue #123076 <https://github.com/rust-lang/rust/issues/123076> for more information
|
|
= help: add `#![feature(mut_ref)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error[E0658]: binding cannot be both mutable and by-reference
|
|
--> $DIR/pattern-errors.rs:107:12
|
|
|
|
|
LL | let [&(mut x)] = &mut [&0];
|
|
| ^^^^
|
|
|
|
|
= note: see issue #123076 <https://github.com/rust-lang/rust/issues/123076> for more information
|
|
= help: add `#![feature(mut_ref)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:114:11
|
|
|
|
|
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:121:11
|
|
|
|
|
LL | let [&&mut x] = &mut [&mut 0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let [&&mut x] = &mut [&mut 0];
|
|
LL + let [&&x] = &mut [&mut 0];
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:128:11
|
|
|
|
|
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:135:11
|
|
|
|
|
LL | let [&&mut ref x] = &mut [&mut 0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let [&&mut ref x] = &mut [&mut 0];
|
|
LL + let [&&ref x] = &mut [&mut 0];
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:142:11
|
|
|
|
|
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[E0308]: mismatched types
|
|
--> $DIR/pattern-errors.rs:149:11
|
|
|
|
|
LL | let [&&mut mut x] = &mut [&mut 0];
|
|
| ^^^^^
|
|
|
|
|
= note: cannot match inherited `&` with `&mut` pattern
|
|
help: replace this `&mut` pattern with `&`
|
|
|
|
|
LL - let [&&mut mut x] = &mut [&mut 0];
|
|
LL + let [&&mut x] = &mut [&mut 0];
|
|
|
|
|
|
|
error: aborting due to 19 previous errors
|
|
|
|
Some errors have detailed explanations: E0308, E0658.
|
|
For more information about an error, try `rustc --explain E0308`.
|