Files
rust/tests/ui/pattern/rfc-3627-match-ergonomics-2024/experimental/pattern-errors.classic.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

88 lines
2.5 KiB
Plaintext
Raw Normal View History

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)) {
| ~
error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0308`.