Skip to content

Commit

Permalink
use a let chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Markeffsky committed Mar 14, 2024
1 parent 379d2a4 commit b5ef7bd
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
// such cases.
if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_ref)) =
key.value.predicate.kind().skip_binder()
&& let Some(sized_def_id) = tcx.lang_items().sized_trait()
&& trait_ref.def_id() == sized_def_id
&& trait_ref.self_ty().is_trivially_sized(tcx)
{
if let Some(sized_def_id) = tcx.lang_items().sized_trait() {
if trait_ref.def_id() == sized_def_id {
if trait_ref.self_ty().is_trivially_sized(tcx) {
return Some(());
}
}
}
return Some(());
}

if let ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(arg)) =
Expand Down

0 comments on commit b5ef7bd

Please sign in to comment.