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>(
3131 if resolved_ty == ty {
3232 // No progress, bail out to prevent "livelock".
3333 return None ;
34+ } else {
35+ resolved_ty
3436 }
35-
36- resolved_ty
3737 }
3838 _ => ty,
3939 }
4040 . into ( )
4141 }
4242 GenericArgKind :: Const ( ct) => {
4343 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 {
4747 // No progress.
4848 return None ;
49+ } else {
50+ resolved
4951 }
50-
51- infcx
52- . tcx
53- . mk_const ( ty:: ConstS { kind : ty:: ConstKind :: Infer ( resolved) , ty : ct. ty ( ) } )
5452 }
5553 _ => ct,
5654 }
You can’t perform that action at this time.
0 commit comments