Store a LocalDefId in hir::GenericParam.

This commit is contained in:
Camille GILLOT
2022-11-06 18:26:36 +00:00
parent e82c08f58e
commit 18482f7b23
19 changed files with 67 additions and 88 deletions

View File

@@ -853,7 +853,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {
// Const parameters are well formed if their type is structural match.
hir::GenericParamKind::Const { ty: hir_ty, default: _ } => {
let ty = tcx.type_of(tcx.hir().local_def_id(param.hir_id));
let ty = tcx.type_of(param.def_id);
if tcx.features().adt_const_params {
if let Some(non_structural_match_ty) =