File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
compiler/rustc_trait_selection/src/traits Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -31,26 +31,24 @@ pub fn obligations<'a, 'tcx>(
31
31
if resolved_ty == ty {
32
32
// No progress, bail out to prevent "livelock".
33
33
return None ;
34
+ } else {
35
+ resolved_ty
34
36
}
35
-
36
- resolved_ty
37
37
}
38
38
_ => ty,
39
39
}
40
40
. into ( )
41
41
}
42
42
GenericArgKind :: Const ( ct) => {
43
43
match ct. kind ( ) {
44
- ty:: ConstKind :: Infer ( infer ) => {
45
- let resolved = infcx. shallow_resolve ( infer ) ;
46
- if resolved == infer {
44
+ ty:: ConstKind :: Infer ( _ ) => {
45
+ let resolved = infcx. shallow_resolve ( ct ) ;
46
+ if resolved == ct {
47
47
// No progress.
48
48
return None ;
49
+ } else {
50
+ resolved
49
51
}
50
-
51
- infcx
52
- . tcx
53
- . mk_const ( ty:: ConstS { kind : ty:: ConstKind :: Infer ( resolved) , ty : ct. ty ( ) } )
54
52
}
55
53
_ => ct,
56
54
}
You can’t perform that action at this time.
0 commit comments