We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fe99f5 commit ee66acbCopy full SHA for ee66acb
compiler/rustc_trait_selection/src/traits/query/type_op/prove_predicate.rs
@@ -20,14 +20,11 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
20
// such cases.
21
if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(trait_ref)) =
22
key.value.predicate.kind().skip_binder()
23
+ && let Some(sized_def_id) = tcx.lang_items().sized_trait()
24
+ && trait_ref.def_id() == sized_def_id
25
+ && trait_ref.self_ty().is_trivially_sized(tcx)
26
{
- 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) {
27
- return Some(());
28
- }
29
30
+ return Some(());
31
}
32
33
if let ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(arg)) =
0 commit comments