From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../borrowck-macro-interaction-issue-6304.rs | 36 ---------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/test/ui/borrowck/borrowck-macro-interaction-issue-6304.rs (limited to 'src/test/ui/borrowck/borrowck-macro-interaction-issue-6304.rs') diff --git a/src/test/ui/borrowck/borrowck-macro-interaction-issue-6304.rs b/src/test/ui/borrowck/borrowck-macro-interaction-issue-6304.rs deleted file mode 100644 index 4e969f6ed..000000000 --- a/src/test/ui/borrowck/borrowck-macro-interaction-issue-6304.rs +++ /dev/null @@ -1,36 +0,0 @@ -// run-pass -#![allow(dead_code)] -#![allow(unused_variables)] -#![allow(unconditional_recursion)] - -// Check that we do not ICE when compiling this -// macro, which reuses the expression `$id` - -#![feature(box_patterns)] - -struct Foo { - a: isize -} - -pub enum Bar { - Bar1, Bar2(isize, Box), -} - -impl Foo { - fn elaborate_stm(&mut self, s: Box) -> Box { - macro_rules! declare { - ($id:expr, $rest:expr) => ({ - self.check_id($id); - Box::new(Bar::Bar2($id, $rest)) - }) - } - match s { - box Bar::Bar2(id, rest) => declare!(id, self.elaborate_stm(rest)), - _ => panic!() - } - } - - fn check_id(&mut self, s: isize) { panic!() } -} - -pub fn main() { } -- cgit v1.2.3