mirror of https://github.com/rust-lang/rust
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
error: expected a pattern, found a method call
|
|
--> $DIR/pat-recover-methodcalls.rs:6:13
|
|
|
|
|
LL | Foo("hi".to_owned()) => true,
|
|
| ^^^^^^^^^^^^^^^ method calls are not allowed in patterns
|
|
|
|
error: expected a pattern, found a method call
|
|
--> $DIR/pat-recover-methodcalls.rs:14:20
|
|
|
|
|
LL | Bar { baz: "hi".to_owned() } => true,
|
|
| ^^^^^^^^^^^^^^^ method calls are not allowed in patterns
|
|
|
|
error: expected a pattern, found a method call
|
|
--> $DIR/pat-recover-methodcalls.rs:24:11
|
|
|
|
|
LL | &["foo".to_string()] => {}
|
|
| ^^^^^^^^^^^^^^^^^ method calls are not allowed in patterns
|
|
|
|
error: expected a pattern, found a method call
|
|
--> $DIR/pat-recover-methodcalls.rs:31:13
|
|
|
|
|
LL | if let (-1.some(4)) = (0, Some(4)) {}
|
|
| ^^^^^^^^^^ method calls are not allowed in patterns
|
|
|
|
error: expected one of `)`, `,`, `...`, `..=`, `..`, or `|`, found `.`
|
|
--> $DIR/pat-recover-methodcalls.rs:34:15
|
|
|
|
|
LL | if let (-1.Some(4)) = (0, Some(4)) {}
|
|
| ^
|
|
| |
|
|
| expected one of `)`, `,`, `...`, `..=`, `..`, or `|`
|
|
| help: missing `,`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|