From 6fdb400ff2a12ff6d96532be3766ec4b3cf12054 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 24 Aug 2018 02:21:52 +0300 Subject: [PATCH] Revert "hygiene: Make sure expansion info is set at most once for a given `Mark`" This reverts commit b15785b67133b5017f141d1fda1dd3dcf331b4b4. --- src/libsyntax_pos/hygiene.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index 364c640debb..99342f36236 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -108,14 +108,7 @@ impl Mark { #[inline] pub fn set_expn_info(self, info: ExpnInfo) { - HygieneData::with(|data| { - let old_info = &mut data.marks[self.0 as usize].expn_info; - if let Some(old_info) = old_info { - panic!("expansion info is reset for the mark {}\nold: {:#?}\nnew: {:#?}", - self.0, old_info, info); - } - *old_info = Some(info); - }) + HygieneData::with(|data| data.marks[self.0 as usize].expn_info = Some(info)) } #[inline]