Commit 658ca0f
committed
gccrs: fix a compiler crash when path expression contains nothing
gcc/rust/ChangeLog:
* ast/rust-path.h: allows error nodes to specify the source
location, so that it could be used in diagnostics later.
* parse/rust-parse-impl.h: creates the PathInExpression error node
with source location and prints proper diagnostics if the path
is empty.
gcc/testsuite/ChangeLog:
* rust/compile/paamayim-nekudotayim.rs: add a test for testing
proper error recovery logic when there is no path names.1 parent 9e07940 commit 658ca0f
File tree
3 files changed
+9
-5
lines changed- gcc
- rust
- ast
- parse
- testsuite/rust/compile
3 files changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | | - | |
| 730 | + | |
731 | 731 | | |
732 | | - | |
| 732 | + | |
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6713 | 6713 | | |
6714 | 6714 | | |
6715 | 6715 | | |
6716 | | - | |
6717 | | - | |
6718 | | - | |
| 6716 | + | |
| 6717 | + | |
6719 | 6718 | | |
6720 | 6719 | | |
6721 | 6720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments