rust/tests/ui/parser/pat-recover-exprs.stderr

77 lines
2.3 KiB
Plaintext
Raw Normal View History

error: expected a pattern, found a method call
--> $DIR/pat-recover-exprs.rs:3:9
|
LL | u8::MAX.abs() => (),
| ^^^^^^^^^^^^^ method calls are not allowed in patterns
error: expected a pattern, found a method call
--> $DIR/pat-recover-exprs.rs:5:9
|
LL | x.sqrt() @ .. => (),
| ^^^^^^^^ method calls are not allowed in patterns
error: left-hand side of `@` must be a binding
--> $DIR/pat-recover-exprs.rs:5:9
|
LL | x.sqrt() @ .. => (),
| --------^^^--
| | |
| | also a pattern
| interpreted as a pattern, not a binding
|
= note: bindings are `x`, `mut x`, `ref x`, and `ref mut x`
error: expected a pattern, found a method call
--> $DIR/pat-recover-exprs.rs:8:17
|
LL | z @ w @ v.u() => (),
| ^^^^^ method calls are not allowed in patterns
error: expected a pattern, found a method call
--> $DIR/pat-recover-exprs.rs:10:9
|
LL | y.ilog(3) => (),
| ^^^^^^^^^ method calls are not allowed in patterns
error: expected a pattern, found an expression
--> $DIR/pat-recover-exprs.rs:12:9
|
LL | n + 1 => (),
| ^^^^^ arbitrary expressions are not allowed in patterns
error: expected a pattern, found an expression
--> $DIR/pat-recover-exprs.rs:14:10
|
LL | ("".f() + 14 * 8) => (),
| ^^^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns
error: expected a pattern, found an expression
--> $DIR/pat-recover-exprs.rs:17:9
|
LL | f?() => (),
| ^^^^ arbitrary expressions are not allowed in patterns
error: expected one of `)`, `,`, or `|`, found `+`
--> $DIR/pat-recover-exprs.rs:19:12
|
LL | (_ + 1) => (),
| ^ expected one of `)`, `,`, or `|`
error: expected a pattern, found an expression
--> $DIR/pat-recover-exprs.rs:23:9
|
LL | let 1 + 1 = 2;
| ^^^^^ arbitrary expressions are not allowed in patterns
error: expected one of `)`, `,`, `@`, or `|`, found `*`
--> $DIR/pat-recover-exprs.rs:26:28
|
LL | let b = matches!(x, (x * x | x.f()) | x[0]);
| ^ expected one of `)`, `,`, `@`, or `|`
--> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
= note: while parsing argument for this `pat` macro fragment
error: aborting due to 11 previous errors