Rollup merge of #107486 - compiler-errors:bound-ty-keep-name, r=oli-obk
Track bound types like bound regions When we instantiate bound types into placeholder types, we throw away the names for some reason. These names are particularly useful for error reporting once we have `for<T>` binders. r? types
This commit is contained in:
commit
d36bdf2d30
13 changed files with 52 additions and 38 deletions
|
@ -1930,7 +1930,7 @@ pub(super) fn check_type_bounds<'tcx>(
|
|||
smallvec::SmallVec::with_capacity(defs.count());
|
||||
InternalSubsts::fill_single(&mut substs, defs, &mut |param, _| match param.kind {
|
||||
GenericParamDefKind::Type { .. } => {
|
||||
let kind = ty::BoundTyKind::Param(param.name);
|
||||
let kind = ty::BoundTyKind::Param(param.def_id, param.name);
|
||||
let bound_var = ty::BoundVariableKind::Ty(kind);
|
||||
bound_vars.push(bound_var);
|
||||
tcx.mk_ty(ty::Bound(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue