1
Fork 0

Fix ICE in opt_suggest_box_span

This commit is contained in:
Michael Goulet 2022-09-09 05:50:25 +00:00
parent 0a605d33cd
commit 5599a45e58
5 changed files with 114 additions and 50 deletions

View file

@ -73,7 +73,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
// for opaque types, and then use that kind to fix the spans for type errors
// that we see later on.
let ty_var = self.next_ty_var(TypeVariableOrigin {
kind: TypeVariableOriginKind::TypeInference,
kind: TypeVariableOriginKind::OpaqueTypeInference(def_id),
span,
});
obligations.extend(

View file

@ -122,6 +122,7 @@ pub enum TypeVariableOriginKind {
MiscVariable,
NormalizeProjectionType,
TypeInference,
OpaqueTypeInference(DefId),
TypeParameterDefinition(Symbol, Option<DefId>),
/// One of the upvars or closure kind parameters in a `ClosureSubsts`