TypeParameterDefinition always require a DefId

This commit is contained in:
lcnr 2023-07-04 11:50:51 +02:00
parent 52d8c490a3
commit 594cd84a94
5 changed files with 8 additions and 8 deletions

View file

@ -265,9 +265,9 @@ impl<'tcx> InferCtxt<'tcx> {
kind: UnderspecifiedArgKind::Type {
prefix: "type parameter".into(),
},
parent: def_id.and_then(|def_id| {
InferenceDiagnosticsParentData::for_def_id(self.tcx, def_id)
}),
parent: InferenceDiagnosticsParentData::for_def_id(
self.tcx, def_id,
),
};
}
}

View file

@ -1110,7 +1110,7 @@ impl<'tcx> InferCtxt<'tcx> {
TypeVariableOrigin {
kind: TypeVariableOriginKind::TypeParameterDefinition(
param.name,
Some(param.def_id),
param.def_id,
),
span,
},

View file

@ -123,7 +123,7 @@ pub enum TypeVariableOriginKind {
NormalizeProjectionType,
TypeInference,
OpaqueTypeInference(DefId),
TypeParameterDefinition(Symbol, Option<DefId>),
TypeParameterDefinition(Symbol, DefId),
/// One of the upvars or closure kind parameters in a `ClosureSubsts`
/// (before it has been determined).