Rollup merge of #125865 - ajwock:ice_not_fully_resolved, r=fee1-dead
Fix ICE caused by ignoring EffectVars in type inference Fixes #119830 r? ```@matthiaskrgr```
This commit is contained in:
commit
7699da4858
5 changed files with 98 additions and 11 deletions
|
@ -587,6 +587,7 @@ pub enum FixupError {
|
|||
UnresolvedFloatTy(FloatVid),
|
||||
UnresolvedTy(TyVid),
|
||||
UnresolvedConst(ConstVid),
|
||||
UnresolvedEffect(EffectVid),
|
||||
}
|
||||
|
||||
/// See the `region_obligations` field for more information.
|
||||
|
@ -614,6 +615,7 @@ impl fmt::Display for FixupError {
|
|||
),
|
||||
UnresolvedTy(_) => write!(f, "unconstrained type"),
|
||||
UnresolvedConst(_) => write!(f, "unconstrained const value"),
|
||||
UnresolvedEffect(_) => write!(f, "unconstrained effect value"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,6 +167,9 @@ impl<'a, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for FullTypeResolver<'a, 'tcx> {
|
|||
ty::ConstKind::Infer(InferConst::Fresh(_)) => {
|
||||
bug!("Unexpected const in full const resolver: {:?}", c);
|
||||
}
|
||||
ty::ConstKind::Infer(InferConst::EffectVar(evid)) => {
|
||||
return Err(FixupError::UnresolvedEffect(evid));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
c.try_super_fold_with(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue