We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Mark
1 parent 17f20be commit b15785bCopy full SHA for b15785b
src/libsyntax_pos/hygiene.rs
@@ -85,7 +85,14 @@ impl Mark {
85
86
#[inline]
87
pub fn set_expn_info(self, info: ExpnInfo) {
88
- HygieneData::with(|data| data.marks[self.0 as usize].expn_info = Some(info))
+ HygieneData::with(|data| {
89
+ let old_info = &mut data.marks[self.0 as usize].expn_info;
90
+ if let Some(old_info) = old_info {
91
+ panic!("expansion info is reset for the mark {}\nold: {:#?}\nnew: {:#?}",
92
+ self.0, old_info, info);
93
+ }
94
+ *old_info = Some(info);
95
+ })
96
}
97
98
pub fn modern(mut self) -> Mark {
0 commit comments