File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -41,18 +41,15 @@ impl<'tcx> MirPass<'tcx> for ImpossiblePredicates {
41
41
tracing:: trace!( def_id = ?body. source. def_id( ) ) ;
42
42
let predicates = tcx. predicates_of ( body. source . def_id ( ) ) . instantiate_identity ( tcx) ;
43
43
tracing:: trace!( ?predicates) ;
44
- let predicates: Vec < _ > = predicates
45
- . predicates
46
- . into_iter ( )
47
- . filter ( |p| {
48
- !p. has_type_flags (
49
- // Only consider global clauses to simplify.
50
- TypeFlags :: HAS_FREE_LOCAL_NAMES
51
- // Clauses that refer to unevaluated constants as they cause cycles.
52
- | TypeFlags :: HAS_CT_PROJECTION ,
53
- )
54
- } )
55
- . collect ( ) ;
44
+ let predicates = predicates. predicates . into_iter ( ) . filter ( |p| {
45
+ !p. has_type_flags (
46
+ // Only consider global clauses to simplify.
47
+ TypeFlags :: HAS_FREE_LOCAL_NAMES
48
+ // Clauses that refer to unevaluated constants as they cause cycles.
49
+ | TypeFlags :: HAS_CT_PROJECTION ,
50
+ )
51
+ } ) ;
52
+ let predicates: Vec < _ > = traits:: elaborate ( tcx, predicates) . collect ( ) ;
56
53
tracing:: trace!( ?predicates) ;
57
54
if predicates. references_error ( ) || traits:: impossible_predicates ( tcx, predicates) {
58
55
trace ! ( "found unsatisfiable predicates" ) ;
You can’t perform that action at this time.
0 commit comments