File tree 1 file changed +8
-1
lines changed
compiler/rustc_infer/src/infer/outlives
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,13 @@ where
363
363
return ;
364
364
}
365
365
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
+
366
373
// This case is thorny for inference. The fundamental problem is
367
374
// that there are many cases where we have choice, and inference
368
375
// doesn't like choice (the current region inference in
@@ -408,7 +415,7 @@ where
408
415
let is_opaque = alias_ty. kind ( self . tcx ) == ty:: Opaque ;
409
416
if approx_env_bounds. is_empty ( )
410
417
&& trait_bounds. is_empty ( )
411
- && ( alias_ty. has_infer ( ) || is_opaque)
418
+ && ( alias_ty. has_infer_regions ( ) || is_opaque)
412
419
{
413
420
debug ! ( "no declared bounds" ) ;
414
421
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