Skip to content

Commit

Permalink
Use is_none instead of if let
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Dec 22, 2019
1 parent 9b98af8 commit 101dd7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
let span = self.tcx.def_span(generator_did);

// Do not ICE on closure typeck (#66868).
if let None = self.tcx.hir().as_local_hir_id(generator_did) {
if self.tcx.hir().as_local_hir_id(generator_did).is_none() {
return false;
}

Expand Down

0 comments on commit 101dd7b

Please sign in to comment.