When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
18 lines
502 B
Text
18 lines
502 B
Text
error[E0586]: inclusive range with no end
|
|
--> $DIR/impossible_range.rs:20:8
|
|
|
|
|
20 | ..=; //~ERROR inclusive range with no end
|
|
| ^
|
|
|
|
|
= help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
|
|
|
|
error[E0586]: inclusive range with no end
|
|
--> $DIR/impossible_range.rs:27:9
|
|
|
|
|
27 | 0..=; //~ERROR inclusive range with no end
|
|
| ^
|
|
|
|
|
= help: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
|
|
|
|
error: aborting due to 2 previous errors
|
|
|