]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #105141 - ohno418:fix-ice-on-invalid-var-decl-in-macro-call, r=compil...
authorMatthias Krüger <matthias.krueger@famsik.de>
Sun, 4 Dec 2022 15:25:32 +0000 (16:25 +0100)
committerGitHub <noreply@github.com>
Sun, 4 Dec 2022 15:25:32 +0000 (16:25 +0100)
Fix ICE on invalid variable declarations in macro calls

This fixes ICE that happens with invalid variable declarations in macro calls like:

```rust
macro_rules! m { ($s:stmt) => {} }
m! { var x }
m! { auto x }
m! { mut x }
```

Found this is because of not collecting tokens on recovery, so I changed to force collect them.

Fixes https://github.com/rust-lang/rust/issues/103529.


Trivial merge