Use let chains instead of let else
This commit is contained in:
parent
27b280e1b5
commit
d7fe44d988
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue