while let all the things
This commit is contained in:
parent
e2746d8700
commit
2e7e68b762
6 changed files with 20 additions and 50 deletions
|
@ -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(..) => ("", "!"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue