1
Fork 0

ImplItemKind::TyAlias => ImplItemKind::Type

This commit is contained in:
Michael Goulet 2022-10-09 07:09:57 +00:00
parent 28eda9b18a
commit 70f3c79c50
27 changed files with 32 additions and 32 deletions

View file

@ -1067,7 +1067,7 @@ fn check_impl_items_against_trait<'tcx>(
opt_trait_span,
);
}
hir::ImplItemKind::TyAlias(impl_ty) => {
hir::ImplItemKind::Type(impl_ty) => {
let opt_trait_span = tcx.hir().span_if_local(ty_trait_item.def_id);
compare_ty_impl(
tcx,

View file

@ -839,7 +839,7 @@ fn check_impl_item(tcx: TyCtxt<'_>, impl_item: &hir::ImplItem<'_>) {
let (method_sig, span) = match impl_item.kind {
hir::ImplItemKind::Fn(ref sig, _) => (Some(sig), impl_item.span),
// Constrain binding and overflow error spans to `<Ty>` in `type foo = <Ty>`.
hir::ImplItemKind::TyAlias(ty) if ty.span != DUMMY_SP => (None, ty.span),
hir::ImplItemKind::Type(ty) if ty.span != DUMMY_SP => (None, ty.span),
_ => (None, impl_item.span),
};