Skip to content

Commit 8aa45c6

Browse files
committed
Rename ItemKind::Ty to ItemKind::TyAlias
1 parent 460072e commit 8aa45c6

File tree

31 files changed

+52
-52
lines changed

31 files changed

+52
-52
lines changed

src/librustc/hir/check_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl Target {
7575
hir::ItemKind::Mod(..) => Target::Mod,
7676
hir::ItemKind::ForeignMod(..) => Target::ForeignMod,
7777
hir::ItemKind::GlobalAsm(..) => Target::GlobalAsm,
78-
hir::ItemKind::Ty(..) => Target::Ty,
78+
hir::ItemKind::TyAlias(..) => Target::TyAlias,
7979
hir::ItemKind::OpaqueTy(..) => Target::OpaqueTy,
8080
hir::ItemKind::Enum(..) => Target::Enum,
8181
hir::ItemKind::Struct(..) => Target::Struct,

src/librustc/hir/intravisit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
500500
ItemKind::GlobalAsm(_) => {
501501
visitor.visit_id(item.hir_id);
502502
}
503-
ItemKind::Ty(ref ty, ref generics) => {
503+
ItemKind::TyAlias(ref ty, ref generics) => {
504504
visitor.visit_id(item.hir_id);
505505
visitor.visit_ty(ty);
506506
visitor.visit_generics(generics)

src/librustc/hir/lowering.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl<'a> LoweringContext<'a> {
486486
ItemKind::Struct(_, ref generics)
487487
| ItemKind::Union(_, ref generics)
488488
| ItemKind::Enum(_, ref generics)
489-
| ItemKind::Ty(_, ref generics)
489+
| ItemKind::TyAlias(_, ref generics)
490490
| ItemKind::OpaqueTy(_, ref generics)
491491
| ItemKind::Trait(_, _, ref generics, ..) => {
492492
let def_id = self.lctx.resolver.definitions().local_def_id(item.id);
@@ -3440,7 +3440,7 @@ impl<'a> LoweringContext<'a> {
34403440
ItemKind::Mod(ref m) => hir::ItemKind::Mod(self.lower_mod(m)),
34413441
ItemKind::ForeignMod(ref nm) => hir::ItemKind::ForeignMod(self.lower_foreign_mod(nm)),
34423442
ItemKind::GlobalAsm(ref ga) => hir::ItemKind::GlobalAsm(self.lower_global_asm(ga)),
3443-
ItemKind::Ty(ref t, ref generics) => hir::ItemKind::Ty(
3443+
ItemKind::TyAlias(ref t, ref generics) => hir::ItemKind::TyAlias(
34443444
self.lower_ty(t, ImplTraitContext::disallowed()),
34453445
self.lower_generics(generics, ImplTraitContext::disallowed()),
34463446
),

src/librustc/hir/map/def_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
9393
ItemKind::Mod(..) | ItemKind::Trait(..) | ItemKind::TraitAlias(..) |
9494
ItemKind::Enum(..) | ItemKind::Struct(..) | ItemKind::Union(..) |
9595
ItemKind::OpaqueTy(..) | ItemKind::ExternCrate(..) | ItemKind::ForeignMod(..) |
96-
ItemKind::Ty(..) => DefPathData::TypeNs(i.ident.as_interned_str()),
96+
ItemKind::TyAlias(..) => DefPathData::TypeNs(i.ident.as_interned_str()),
9797
ItemKind::Fn(
9898
ref decl,
9999
ref header,

src/librustc/hir/map/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ impl<'hir> Map<'hir> {
302302
ItemKind::Fn(..) => DefKind::Fn,
303303
ItemKind::Mod(..) => DefKind::Mod,
304304
ItemKind::OpaqueTy(..) => DefKind::OpaqueTy,
305-
ItemKind::Ty(..) => DefKind::TyAlias,
305+
ItemKind::TyAlias(..) => DefKind::TyAlias,
306306
ItemKind::Enum(..) => DefKind::Enum,
307307
ItemKind::Struct(..) => DefKind::Struct,
308308
ItemKind::Union(..) => DefKind::Union,
@@ -576,7 +576,7 @@ impl<'hir> Map<'hir> {
576576
Node::Item(ref item) => {
577577
match item.node {
578578
ItemKind::Fn(_, _, ref generics, _) |
579-
ItemKind::Ty(_, ref generics) |
579+
ItemKind::TyAlias(_, ref generics) |
580580
ItemKind::Enum(_, ref generics) |
581581
ItemKind::Struct(_, ref generics) |
582582
ItemKind::Union(_, ref generics) |
@@ -1269,7 +1269,7 @@ fn hir_id_to_string(map: &Map<'_>, id: HirId, include_id: bool) -> String {
12691269
ItemKind::Mod(..) => "mod",
12701270
ItemKind::ForeignMod(..) => "foreign mod",
12711271
ItemKind::GlobalAsm(..) => "global asm",
1272-
ItemKind::Ty(..) => "ty",
1272+
ItemKind::TyAlias(..) => "ty",
12731273
ItemKind::OpaqueTy(..) => "opaque type",
12741274
ItemKind::Enum(..) => "enum",
12751275
ItemKind::Struct(..) => "struct",

src/librustc/hir/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,7 +2420,7 @@ pub enum ItemKind {
24202420
/// Module-level inline assembly (from global_asm!)
24212421
GlobalAsm(P<GlobalAsm>),
24222422
/// A type alias, e.g., `type Foo = Bar<u8>`
2423-
Ty(P<Ty>, Generics),
2423+
TyAlias(P<Ty>, Generics),
24242424
/// An opaque `impl Trait` type alias, e.g., `type Foo = impl Bar;`
24252425
OpaqueTy(OpaqueTy),
24262426
/// An enum definition, e.g., `enum Foo<A, B> {C<A>, D<B>}`
@@ -2455,7 +2455,7 @@ impl ItemKind {
24552455
ItemKind::Mod(..) => "module",
24562456
ItemKind::ForeignMod(..) => "foreign module",
24572457
ItemKind::GlobalAsm(..) => "global asm",
2458-
ItemKind::Ty(..) => "type alias",
2458+
ItemKind::TyAlias(..) => "type alias",
24592459
ItemKind::OpaqueTy(..) => "opaque type",
24602460
ItemKind::Enum(..) => "enum",
24612461
ItemKind::Struct(..) => "struct",
@@ -2478,7 +2478,7 @@ impl ItemKind {
24782478
pub fn generics(&self) -> Option<&Generics> {
24792479
Some(match *self {
24802480
ItemKind::Fn(_, _, ref generics, _) |
2481-
ItemKind::Ty(_, ref generics) |
2481+
ItemKind::TyAlias(_, ref generics) |
24822482
ItemKind::OpaqueTy(OpaqueTy { ref generics, impl_trait_fn: None, .. }) |
24832483
ItemKind::Enum(_, ref generics) |
24842484
ItemKind::Struct(_, ref generics) |

src/librustc/hir/print.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ impl<'a> State<'a> {
570570
self.s.word(ga.asm.as_str().to_string());
571571
self.end()
572572
}
573-
hir::ItemKind::Ty(ref ty, ref generics) => {
573+
hir::ItemKind::TyAlias(ref ty, ref generics) => {
574574
self.print_item_type(item, &generics, |state| {
575575
state.word_space("=");
576576
state.print_type(&ty);

src/librustc/middle/dead.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ impl DeadVisitor<'tcx> {
480480
hir::ItemKind::Static(..)
481481
| hir::ItemKind::Const(..)
482482
| hir::ItemKind::Fn(..)
483-
| hir::ItemKind::Ty(..)
483+
| hir::ItemKind::TyAlias(..)
484484
| hir::ItemKind::Enum(..)
485485
| hir::ItemKind::Struct(..)
486486
| hir::ItemKind::Union(..) => true,

src/librustc/middle/reachable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl<'a, 'tcx> ReachableContext<'a, 'tcx> {
264264
hir::ItemKind::ExternCrate(_) |
265265
hir::ItemKind::Use(..) |
266266
hir::ItemKind::OpaqueTy(..) |
267-
hir::ItemKind::Ty(..) |
267+
hir::ItemKind::TyAlias(..) |
268268
hir::ItemKind::Static(..) |
269269
hir::ItemKind::Mod(..) |
270270
hir::ItemKind::ForeignMod(..) |

src/librustc/middle/resolve_lifetime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
488488
// items. Doing anything on this node is irrelevant, as we currently don't need
489489
// it.
490490
}
491-
hir::ItemKind::Ty(_, ref generics)
491+
hir::ItemKind::TyAlias(_, ref generics)
492492
| hir::ItemKind::OpaqueTy(hir::OpaqueTy {
493493
impl_trait_fn: None,
494494
ref generics,
@@ -1259,7 +1259,7 @@ fn compute_object_lifetime_defaults(tcx: TyCtxt<'_>) -> HirIdMap<Vec<ObjectLifet
12591259
impl_trait_fn: None,
12601260
..
12611261
})
1262-
| hir::ItemKind::Ty(_, ref generics)
1262+
| hir::ItemKind::TyAlias(_, ref generics)
12631263
| hir::ItemKind::Trait(_, _, ref generics, ..) => {
12641264
let result = object_lifetime_defaults_for_item(tcx, generics);
12651265

0 commit comments

Comments
 (0)