Skip to content

Commit ab3f4fd

Browse files
committed
Apply review suggestions
1 parent 089a894 commit ab3f4fd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_lint/unused.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use syntax::print::pprust;
1717
use syntax::symbol::{kw, sym};
1818
use syntax::symbol::Symbol;
1919
use syntax::util::parser;
20-
use syntax_pos::{MultiSpan, Span, BytePos};
20+
use syntax_pos::{Span, BytePos};
2121

2222
use log::debug;
2323

@@ -356,8 +356,7 @@ impl UnusedParens {
356356
ast::ExprKind::Paren(ref inner) => {
357357
if !Self::is_expr_parens_necessary(inner, followed_by_block) &&
358358
value.attrs.is_empty() &&
359-
!MultiSpan::from(value.span).primary_span()
360-
.map_or(false, |span| span.from_expansion())
359+
!value.span.from_expansion()
361360
{
362361
let expr_text = if let Ok(snippet) = cx.sess().source_map()
363362
.span_to_snippet(value.span) {

0 commit comments

Comments
 (0)