Skip to content

Commit 63659ca

Browse files
committed
Rename ItemImplKind::Type to ItemImplKind::TyAlias
1 parent 8aa45c6 commit 63659ca

File tree

28 files changed

+36
-35
lines changed

28 files changed

+36
-35
lines changed

src/librustc/hir/intravisit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ pub fn walk_impl_item<'v, V: Visitor<'v>>(visitor: &mut V, impl_item: &'v ImplIt
926926
impl_item.span,
927927
impl_item.hir_id);
928928
}
929-
ImplItemKind::Type(ref ty) => {
929+
ImplItemKind::TyAlias(ref ty) => {
930930
visitor.visit_id(impl_item.hir_id);
931931
visitor.visit_ty(ty);
932932
}

src/librustc/hir/lowering.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,9 +3914,9 @@ impl<'a> LoweringContext<'a> {
39143914

39153915
(generics, hir::ImplItemKind::Method(sig, body_id))
39163916
}
3917-
ImplItemKind::Type(ref ty) => (
3917+
ImplItemKind::TyAlias(ref ty) => (
39183918
self.lower_generics(&i.generics, ImplTraitContext::disallowed()),
3919-
hir::ImplItemKind::Type(self.lower_ty(ty, ImplTraitContext::disallowed())),
3919+
hir::ImplItemKind::TyAlias(self.lower_ty(ty, ImplTraitContext::disallowed())),
39203920
),
39213921
ImplItemKind::OpaqueTy(ref bounds) => (
39223922
self.lower_generics(&i.generics, ImplTraitContext::disallowed()),
@@ -3950,7 +3950,7 @@ impl<'a> LoweringContext<'a> {
39503950
defaultness: self.lower_defaultness(i.defaultness, true /* [1] */),
39513951
kind: match i.node {
39523952
ImplItemKind::Const(..) => hir::AssocItemKind::Const,
3953-
ImplItemKind::Type(..) => hir::AssocItemKind::Type,
3953+
ImplItemKind::TyAlias(..) => hir::AssocItemKind::Type,
39543954
ImplItemKind::OpaqueTy(..) => hir::AssocItemKind::OpaqueTy,
39553955
ImplItemKind::Method(ref sig, _) => hir::AssocItemKind::Method {
39563956
has_self: sig.decl.has_self(),

src/librustc/hir/map/def_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
222222
}
223223
ImplItemKind::Method(..) | ImplItemKind::Const(..) =>
224224
DefPathData::ValueNs(ii.ident.as_interned_str()),
225-
ImplItemKind::Type(..) |
225+
ImplItemKind::TyAlias(..) |
226226
ImplItemKind::OpaqueTy(..) => {
227227
DefPathData::TypeNs(ii.ident.as_interned_str())
228228
},

src/librustc/hir/map/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ impl<'hir> Map<'hir> {
333333
match item.node {
334334
ImplItemKind::Const(..) => DefKind::AssocConst,
335335
ImplItemKind::Method(..) => DefKind::Method,
336-
ImplItemKind::Type(..) => DefKind::AssocTy,
336+
ImplItemKind::TyAlias(..) => DefKind::AssocTy,
337337
ImplItemKind::OpaqueTy(..) => DefKind::AssocOpaqueTy,
338338
}
339339
}
@@ -1291,7 +1291,7 @@ fn hir_id_to_string(map: &Map<'_>, id: HirId, include_id: bool) -> String {
12911291
ImplItemKind::Method(..) => {
12921292
format!("method {} in {}{}", ii.ident, path_str(), id_str)
12931293
}
1294-
ImplItemKind::Type(_) => {
1294+
ImplItemKind::TyAlias(_) => {
12951295
format!("assoc type {} in {}{}", ii.ident, path_str(), id_str)
12961296
}
12971297
ImplItemKind::OpaqueTy(_) => {

src/librustc/hir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ pub enum ImplItemKind {
18371837
/// A method implementation with the given signature and body.
18381838
Method(MethodSig, BodyId),
18391839
/// An associated type.
1840-
Type(P<Ty>),
1840+
TyAlias(P<Ty>),
18411841
/// An associated `type = impl Trait`.
18421842
OpaqueTy(GenericBounds),
18431843
}

src/librustc/hir/print.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ impl<'a> State<'a> {
908908
self.end(); // need to close a box
909909
self.ann.nested(self, Nested::Body(body));
910910
}
911-
hir::ImplItemKind::Type(ref ty) => {
911+
hir::ImplItemKind::TyAlias(ref ty) => {
912912
self.print_associated_type(ii.ident, None, Some(ty));
913913
}
914914
hir::ImplItemKind::OpaqueTy(ref bounds) => {

src/librustc/infer/error_reporting/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl<'tcx> TyCtxt<'tcx> {
270270
hir::ImplItemKind::Method(..) => "method body",
271271
hir::ImplItemKind::Const(..)
272272
| hir::ImplItemKind::OpaqueTy(..)
273-
| hir::ImplItemKind::Type(..) => "associated item",
273+
| hir::ImplItemKind::TyAlias(..) => "associated item",
274274
}
275275
}
276276

src/librustc/middle/dead.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ impl Visitor<'tcx> for DeadVisitor<'tcx> {
640640
self.visit_nested_body(body_id)
641641
}
642642
hir::ImplItemKind::OpaqueTy(..) |
643-
hir::ImplItemKind::Type(..) => {}
643+
hir::ImplItemKind::TyAlias(..) => {}
644644
}
645645
}
646646

src/librustc/middle/reachable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
189189
}
190190
}
191191
hir::ImplItemKind::OpaqueTy(..) |
192-
hir::ImplItemKind::Type(_) => false,
192+
hir::ImplItemKind::TyAlias(_) => false,
193193
}
194194
}
195195
Some(_) => false,
@@ -302,7 +302,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
302302
}
303303
}
304304
hir::ImplItemKind::OpaqueTy(..) |
305-
hir::ImplItemKind::Type(_) => {}
305+
hir::ImplItemKind::TyAlias(_) => {}
306306
}
307307
}
308308
Node::Expr(&hir::Expr { node: hir::ExprKind::Closure(.., body, _, _), .. }) => {

src/librustc/middle/resolve_lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
828828
|this| intravisit::walk_impl_item(this, impl_item),
829829
)
830830
}
831-
Type(ref ty) => {
831+
TyAlias(ref ty) => {
832832
let generics = &impl_item.generics;
833833
let mut index = self.next_early_index();
834834
let mut non_lifetime_count = 0;

0 commit comments

Comments
 (0)