mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Use let chains instead of let else
This commit is contained in:
parent
27b280e1b5
commit
d7fe44d988
@ -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…
Reference in New Issue
Block a user