File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
compiler/rustc_infer/src/infer/outlives Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,13 @@ where
363363 return ;
364364 }
365365
366+ if alias_ty. has_non_region_infer ( ) {
367+ self . tcx
368+ . dcx ( )
369+ . span_delayed_bug ( origin. span ( ) , "an alias has infers during region solving" ) ;
370+ return ;
371+ }
372+
366373 // This case is thorny for inference. The fundamental problem is
367374 // that there are many cases where we have choice, and inference
368375 // doesn't like choice (the current region inference in
@@ -408,7 +415,7 @@ where
408415 let is_opaque = alias_ty. kind ( self . tcx ) == ty:: Opaque ;
409416 if approx_env_bounds. is_empty ( )
410417 && trait_bounds. is_empty ( )
411- && ( alias_ty. has_infer ( ) || is_opaque)
418+ && ( alias_ty. has_infer_regions ( ) || is_opaque)
412419 {
413420 debug ! ( "no declared bounds" ) ;
414421 let opt_variances = is_opaque. then ( || self . tcx . variances_of ( alias_ty. def_id ) ) ;
You can’t perform that action at this time.
0 commit comments