Make use of new outer_expn_info() function

This commit is contained in:
Lzu Tao
2019-06-01 16:25:51 +07:00
parent f3087c37bf
commit f67c3e4b2a
7 changed files with 12 additions and 25 deletions

View File

@@ -594,8 +594,7 @@ fn is_used(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {
fn in_attributes_expansion(expr: &Expr) -> bool {
expr.span
.ctxt()
.outer()
.expn_info()
.outer_expn_info()
.map_or(false, |info| matches!(info.format, ExpnFormat::MacroAttribute(_)))
}