File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
compiler/rustc_trait_selection/src/traits/query/type_op Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,11 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ProvePredicate<'tcx> {
20
20
// such cases.
21
21
if let ty:: PredicateKind :: Clause ( ty:: ClauseKind :: Trait ( trait_ref) ) =
22
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)
23
26
{
24
- if let Some ( sized_def_id) = tcx. lang_items ( ) . sized_trait ( ) {
25
- if trait_ref. def_id ( ) == sized_def_id {
26
- if trait_ref. self_ty ( ) . is_trivially_sized ( tcx) {
27
- return Some ( ( ) ) ;
28
- }
29
- }
30
- }
27
+ return Some ( ( ) ) ;
31
28
}
32
29
33
30
if let ty:: PredicateKind :: Clause ( ty:: ClauseKind :: WellFormed ( arg) ) =
You can’t perform that action at this time.
0 commit comments