1
Fork 0

Implement custom diagnostic for ConstParamTy

This commit is contained in:
Michael Goulet 2023-05-17 04:05:46 +00:00
parent a9fcb524ff
commit 847d50453c
51 changed files with 455 additions and 152 deletions

View file

@ -836,7 +836,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {
ObligationCause::new(
hir_ty.span,
param.def_id,
ObligationCauseCode::WellFormed(Some(hir_ty.span)),
ObligationCauseCode::ConstParam(ty),
),
wfcx.param_env,
ty,