about summary refs log tree commit diff
path: root/tests/ui/parser/expr-as-stmt.stderr
AgeCommit message (Collapse)AuthorLines
2025-08-31More targeted parentheses suggestion for match statement intended as expressionEsteban Küber-6/+69
``` error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:69:5 | LL | match () { () => 1 } + match () { () => 1 } | ^^^^^^^^^^^^^^^^^^^^ expected `()`, found integer | help: parentheses are required to parse this as an expression | LL | (match () { () => 1 }) + match () { () => 1 } | + + ```
2025-08-31Provide suggestion when encountering `match () { () => 1 } + match () { () ↵Esteban Küber-3/+10
=> 1 }` ``` error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:69:5 | LL | match () { () => 1 } + match () { () => 1 } | ^^^^^^^^^^^^^^^^^^^^ expected `()`, found integer | help: consider using a semicolon here | LL | match () { () => 1 }; + match () { () => 1 } | + help: alternatively, parentheses are required to parse this as an expression | LL | (match () { () => 1 }) + match () { () => 1 } | + + ``` Parentheses are needed for the `match` to be unambiguously parsed as an expression and not a statement when chaining with binops that are also unops.
2025-02-25Make E0614 a structured errorEsteban Küber-1/+1
``` error[E0614]: type `(..., ..., ..., ...)` cannot be dereferenced --> $DIR/long-E0614.rs:10:5 | LL | *x; | ^^ can't be dereferenced | = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt' = note: consider using `--verbose` to print the full type name to the console ```
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+248