Fix ICE with buffered lint referring to AST node deleted by everybody_loops

This commit is contained in:
Fabian Wolff 2021-10-03 21:04:36 +02:00
parent edebf77e00
commit a28a78f247
3 changed files with 38 additions and 6 deletions

View file

@ -0,0 +1,12 @@
// Regression test for issue #87308.
// compile-flags: -Zunpretty=everybody_loops
// check-pass
macro_rules! foo {
() => { break 'x; }
}
pub fn main() {
'x: loop { foo!() }
}

View file

@ -0,0 +1,14 @@
#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
// Regression test for issue #87308.
// compile-flags: -Zunpretty=everybody_loops
// check-pass
macro_rules! foo { () => { break 'x ; } }
pub fn main() { loop { } }