Lower generic const items to HIR
This commit is contained in:
parent
afd009a8d8
commit
9213aec762
16 changed files with 84 additions and 41 deletions
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue