Use let chains instead of let else

This commit is contained in:
fee1-dead 2022-09-30 00:31:53 +00:00
parent 27b280e1b5
commit d7fe44d988

View File

@ -198,8 +198,8 @@ impl<'tcx> Visitor<'tcx> for CheckConstVisitor<'tcx> {
of_trait: Some(trait_ref),
..
}) = item.kind
&& let Some(def_id) = trait_ref.trait_def_id()
{
let Some(def_id) = trait_ref.trait_def_id() else { return; };
let source_map = tcx.sess.source_map();
if !tcx.has_attr(def_id, sym::const_trait) {
tcx.sess