1
Fork 0

Lower generic const items to HIR

This commit is contained in:
León Orell Valerian Liehr 2023-05-04 16:40:57 +02:00
parent afd009a8d8
commit 9213aec762
No known key found for this signature in database
GPG key ID: D17A07215F68E713
16 changed files with 84 additions and 41 deletions

View file

@ -404,7 +404,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::EarlyBinder<Ty
icx.to_ty(ty)
}
}
ItemKind::Const(ty, body_id) => {
ItemKind::Const(ty, _, body_id) => {
if is_suggestable_infer_ty(ty) {
infer_placeholder_type(
tcx, def_id, body_id, ty.span, item.ident, "constant",

View file

@ -130,7 +130,7 @@ fn diagnostic_hir_wf_check<'tcx>(
hir::Node::Item(item) => match item.kind {
hir::ItemKind::TyAlias(ty, _)
| hir::ItemKind::Static(ty, _, _)
| hir::ItemKind::Const(ty, _) => vec![ty],
| hir::ItemKind::Const(ty, _, _) => vec![ty],
hir::ItemKind::Impl(impl_) => match &impl_.of_trait {
Some(t) => t
.path