diff options
| author | Georg Semmler <georg_semmler_05@web.de> | 2019-12-11 10:10:41 +0100 |
|---|---|---|
| committer | Georg Semmler <georg_semmler_05@web.de> | 2019-12-11 10:10:41 +0100 |
| commit | ab3f4fd709fc2fcb19cda89305da08d9ae989c47 (patch) | |
| tree | 85e3697f391f277ca1babbf38b9808cc0a10206d | |
| parent | 089a894193c34babe51af62e570d295021c215d6 (diff) | |
| download | rust-ab3f4fd709fc2fcb19cda89305da08d9ae989c47.tar.gz rust-ab3f4fd709fc2fcb19cda89305da08d9ae989c47.zip | |
Apply review suggestions
| -rw-r--r-- | src/librustc_lint/unused.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs index ee644acd099..e6f39cca6dc 100644 --- a/src/librustc_lint/unused.rs +++ b/src/librustc_lint/unused.rs @@ -17,7 +17,7 @@ use syntax::print::pprust; use syntax::symbol::{kw, sym}; use syntax::symbol::Symbol; use syntax::util::parser; -use syntax_pos::{MultiSpan, Span, BytePos}; +use syntax_pos::{Span, BytePos}; use log::debug; @@ -356,8 +356,7 @@ impl UnusedParens { ast::ExprKind::Paren(ref inner) => { if !Self::is_expr_parens_necessary(inner, followed_by_block) && value.attrs.is_empty() && - !MultiSpan::from(value.span).primary_span() - .map_or(false, |span| span.from_expansion()) + !value.span.from_expansion() { let expr_text = if let Ok(snippet) = cx.sess().source_map() .span_to_snippet(value.span) { |
