rust/compiler/rustc_parse
Guillaume Gomez 1bef90fb25
Rollup merge of #86010 - FabianWolff:ICE-parser, r=varkor
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.
2021-06-07 01:06:52 +02:00
..
src Rollup merge of #86010 - FabianWolff:ICE-parser, r=varkor 2021-06-07 01:06:52 +02:00
Cargo.toml bumped smallvec deps 2021-02-14 18:03:11 +03:00