enso/lib/rust
Kaz Wesley 8771855993
Fix failure to parse an invalid syntax case (#11754)
Fix failure to parse a syntax case involving unexpected usage of annotated expressions (fixes #11691).

The root cause of the bug was usage of the `matches!` macro in a situation where a `match` statement should have been used to enforce exhaustiveness.

- I have corrected the bug, and reviewed all usages of the `matches!` macro. I didn't find any other *incorrect* usages of `matches!`, but I found and replaced some potentially *fragile* uses. I also simplified some unnecessary uses of `matches!`, replacing them with expressions that are more-obviously correct.
- Stricter parsing: It is now a syntax error for an inline annotation to occur in the RHS of an application (e.g. `fn @Tail_Call recur`)--the precedence in this case may be surprising, so parentheses should be used around the annotated expression.

`parse_all_enso_files.sh`: This PR does not affect any AST in the .enso corpus.
2024-12-05 20:16:40 +00:00
..
launcher-shims Bump Rust Toolchain (#9517) 2024-03-24 23:45:55 +00:00
macro-utils Rust bump, reduce dependencices (#10803) 2024-08-13 23:16:55 +00:00
metamodel Remove all usages of unstable rust features (#10813) 2024-08-22 14:09:17 +00:00
parser Fix failure to parse an invalid syntax case (#11754) 2024-12-05 20:16:40 +00:00
prelude Move documentation into documentable types (#11441) 2024-11-04 15:33:53 +00:00
reflect Remove all usages of unstable rust features (#10813) 2024-08-22 14:09:17 +00:00
zst remove unused rust modules (#9540) 2024-03-27 12:19:38 +00:00