Skip to content

Commit

Permalink
Merge branch 'bugfix/issue_66295' of github.com:weiznich/rust into bu…
Browse files Browse the repository at this point in the history
…gfix/issue_66295
  • Loading branch information
weiznich committed Dec 6, 2019
2 parents 9598cf4 + cc4ced8 commit 089a894
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_lint/unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ impl UnusedParens {
if !Self::is_expr_parens_necessary(inner, followed_by_block) &&
value.attrs.is_empty() &&
!MultiSpan::from(value.span).primary_span()
.map(|span| span.from_expansion())
.unwrap_or(false)
.map_or(false, |span| span.from_expansion())
{
let expr_text = if let Ok(snippet) = cx.sess().source_map()
.span_to_snippet(value.span) {
Expand Down

0 comments on commit 089a894

Please sign in to comment.