Fix ICE in opt_suggest_box_span
This commit is contained in:
parent
0a605d33cd
commit
5599a45e58
5 changed files with 114 additions and 50 deletions
|
@ -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(
|
||||
|
|
|
@ -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`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue