Accessing Span internals is deprecated

This commit is contained in:
Oliver Schneider
2017-08-31 14:47:45 +02:00
parent 9d6c0feef2
commit a8cf4e8ecb
13 changed files with 42 additions and 88 deletions

View File

@@ -567,7 +567,7 @@ fn is_used(cx: &LateContext, expr: &Expr) -> bool {
/// generated by
/// `#[derive(...)`] or the like).
fn in_attributes_expansion(expr: &Expr) -> bool {
expr.span.ctxt.outer().expn_info().map_or(
expr.span.ctxt().outer().expn_info().map_or(
false,
|info| matches!(info.callee.format, ExpnFormat::MacroAttribute(_)),
)