1
Fork 0

while let all the things

This commit is contained in:
leonardo.yvens 2018-03-05 15:58:54 -03:00
parent e2746d8700
commit 2e7e68b762
6 changed files with 20 additions and 50 deletions

View file

@ -322,12 +322,7 @@ impl Span {
pub fn macro_backtrace(mut self) -> Vec<MacroBacktrace> {
let mut prev_span = DUMMY_SP;
let mut result = vec![];
loop {
let info = match self.ctxt().outer().expn_info() {
Some(info) => info,
None => break,
};
while let Some(info) = self.ctxt().outer().expn_info() {
let (pre, post) = match info.callee.format {
ExpnFormat::MacroAttribute(..) => ("#[", "]"),
ExpnFormat::MacroBang(..) => ("", "!"),