Skip to content

Commit d7fe44d

Browse files
committed
Use let chains instead of let else
1 parent 27b280e commit d7fe44d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_passes/src/check_const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ impl<'tcx> Visitor<'tcx> for CheckConstVisitor<'tcx> {
198198
of_trait: Some(trait_ref),
199199
..
200200
}) = item.kind
201+
&& let Some(def_id) = trait_ref.trait_def_id()
201202
{
202-
let Some(def_id) = trait_ref.trait_def_id() else { return; };
203203
let source_map = tcx.sess.source_map();
204204
if !tcx.has_attr(def_id, sym::const_trait) {
205205
tcx.sess

0 commit comments

Comments
 (0)