We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 089a894 commit ab3f4fdCopy full SHA for ab3f4fd
src/librustc_lint/unused.rs
@@ -17,7 +17,7 @@ use syntax::print::pprust;
17
use syntax::symbol::{kw, sym};
18
use syntax::symbol::Symbol;
19
use syntax::util::parser;
20
-use syntax_pos::{MultiSpan, Span, BytePos};
+use syntax_pos::{Span, BytePos};
21
22
use log::debug;
23
@@ -356,8 +356,7 @@ impl UnusedParens {
356
ast::ExprKind::Paren(ref inner) => {
357
if !Self::is_expr_parens_necessary(inner, followed_by_block) &&
358
value.attrs.is_empty() &&
359
- !MultiSpan::from(value.span).primary_span()
360
- .map_or(false, |span| span.from_expansion())
+ !value.span.from_expansion()
361
{
362
let expr_text = if let Ok(snippet) = cx.sess().source_map()
363
.span_to_snippet(value.span) {
0 commit comments