mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
1bef90fb25
Fix two ICEs in the parser This pull request fixes #84104 and fixes #84148. The latter is caused by an invalid `assert_ne!()` in the parser, which I have simply removed because the error is then caught in another part of the parser. #84104 is somewhat more subtle and has to do with a suggestion to remove extraneous `<` characters; for instance: ```rust fn main() { foo::<Ty<<<i32>(); } ``` currently leads to ``` error: unmatched angle brackets --> unmatched-langle.rs:2:10 | 2 | foo::<Ty<<<i32>(); | ^^^ help: remove extra angle brackets ``` which is obviously wrong and stems from the fact that the code for issuing the above suggestion does not consider the possibility that there might be other tokens in between the opening angle brackets. In #84104, this has led to a span being generated that ends in the middle of a multi-byte character (because the code issuing the suggestion thought that it was only skipping over `<`, which are single-byte), causing an ICE. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |