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

src/librustc_incremental/persist/dirty_clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl DirtyCleanVisitor<'tcx> {
354354
HirItem::GlobalAsm(..) => ("ItemGlobalAsm", LABELS_HIR_ONLY),
355355

356356
// A type alias, e.g., `type Foo = Bar<u8>`
357-
HirItem::Ty(..) => ("ItemTy", LABELS_HIR_ONLY),
357+
HirItem::TyAlias(..) => ("ItemTy", LABELS_HIR_ONLY),
358358

359359
// An enum definition, e.g., `enum Foo<A, B> {C<A>, D<B>}`
360360
HirItem::Enum(..) => ("ItemEnum", LABELS_ADT),

src/librustc_lint/builtin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxPointers {
117117
fn check_item(&mut self, cx: &LateContext<'_, '_>, it: &hir::Item) {
118118
match it.node {
119119
hir::ItemKind::Fn(..) |
120-
hir::ItemKind::Ty(..) |
120+
hir::ItemKind::TyAlias(..) |
121121
hir::ItemKind::Enum(..) |
122122
hir::ItemKind::Struct(..) |
123123
hir::ItemKind::Union(..) => {
@@ -406,7 +406,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
406406
}
407407
"a trait"
408408
}
409-
hir::ItemKind::Ty(..) => "a type alias",
409+
hir::ItemKind::TyAlias(..) => "a type alias",
410410
hir::ItemKind::Impl(.., Some(ref trait_ref), _, ref impl_item_refs) => {
411411
// If the trait is private, add the impl items to `private_traits` so they don't get
412412
// reported for missing docs.
@@ -1123,7 +1123,7 @@ impl TypeAliasBounds {
11231123
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeAliasBounds {
11241124
fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &hir::Item) {
11251125
let (ty, type_alias_generics) = match item.node {
1126-
hir::ItemKind::Ty(ref ty, ref generics) => (&*ty, generics),
1126+
hir::ItemKind::TyAlias(ref ty, ref generics) => (&*ty, generics),
11271127
_ => return,
11281128
};
11291129
let mut suggested_changing_assoc_types = false;

src/librustc_lint/nonstandard_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl EarlyLintPass for NonCamelCaseTypes {
137137
}
138138

139139
match it.node {
140-
ast::ItemKind::Ty(..) |
140+
ast::ItemKind::TyAlias(..) |
141141
ast::ItemKind::Enum(..) |
142142
ast::ItemKind::Struct(..) |
143143
ast::ItemKind::Union(..) => self.check_case(cx, "type", &it.ident),

src/librustc_metadata/encoder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ impl EncodeContext<'tcx> {
10941094
}
10951095
hir::ItemKind::ForeignMod(_) => EntryKind::ForeignMod,
10961096
hir::ItemKind::GlobalAsm(..) => EntryKind::GlobalAsm,
1097-
hir::ItemKind::Ty(..) => EntryKind::Type,
1097+
hir::ItemKind::TyAlias(..) => EntryKind::Type,
10981098
hir::ItemKind::OpaqueTy(..) => EntryKind::OpaqueTy,
10991099
hir::ItemKind::Enum(..) => EntryKind::Enum(get_repr_options(tcx, def_id)),
11001100
hir::ItemKind::Struct(ref struct_def, _) => {
@@ -1227,7 +1227,7 @@ impl EncodeContext<'tcx> {
12271227
hir::ItemKind::Static(..) |
12281228
hir::ItemKind::Const(..) |
12291229
hir::ItemKind::Fn(..) |
1230-
hir::ItemKind::Ty(..) |
1230+
hir::ItemKind::TyAlias(..) |
12311231
hir::ItemKind::OpaqueTy(..) |
12321232
hir::ItemKind::Enum(..) |
12331233
hir::ItemKind::Struct(..) |
@@ -1247,7 +1247,7 @@ impl EncodeContext<'tcx> {
12471247
hir::ItemKind::Static(..) |
12481248
hir::ItemKind::Const(..) |
12491249
hir::ItemKind::Fn(..) |
1250-
hir::ItemKind::Ty(..) |
1250+
hir::ItemKind::TyAlias(..) |
12511251
hir::ItemKind::Enum(..) |
12521252
hir::ItemKind::Struct(..) |
12531253
hir::ItemKind::Union(..) |
@@ -1261,7 +1261,7 @@ impl EncodeContext<'tcx> {
12611261
hir::ItemKind::Static(..) |
12621262
hir::ItemKind::Const(..) |
12631263
hir::ItemKind::Fn(..) |
1264-
hir::ItemKind::Ty(..) |
1264+
hir::ItemKind::TyAlias(..) |
12651265
hir::ItemKind::Enum(..) |
12661266
hir::ItemKind::Struct(..) |
12671267
hir::ItemKind::Union(..) |
@@ -1761,7 +1761,7 @@ impl EncodeContext<'tcx> {
17611761
hir::ItemKind::GlobalAsm(..) |
17621762
hir::ItemKind::ExternCrate(..) |
17631763
hir::ItemKind::Use(..) |
1764-
hir::ItemKind::Ty(..) |
1764+
hir::ItemKind::TyAlias(..) |
17651765
hir::ItemKind::OpaqueTy(..) |
17661766
hir::ItemKind::TraitAlias(..) => {
17671767
// no sub-item recording needed in these cases

src/librustc_mir/monomorphize/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ impl ItemLikeVisitor<'v> for RootCollector<'_, 'v> {
969969
hir::ItemKind::ExternCrate(..) |
970970
hir::ItemKind::Use(..) |
971971
hir::ItemKind::ForeignMod(..) |
972-
hir::ItemKind::Ty(..) |
972+
hir::ItemKind::TyAlias(..) |
973973
hir::ItemKind::Trait(..) |
974974
hir::ItemKind::TraitAlias(..) |
975975
hir::ItemKind::OpaqueTy(..) |

src/librustc_passes/layout_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl ItemLikeVisitor<'tcx> for VarianceTest<'tcx> {
3131
fn visit_item(&mut self, item: &'tcx hir::Item) {
3232
let item_def_id = self.tcx.hir().local_def_id(item.hir_id);
3333

34-
if let ItemKind::Ty(..) = item.node {
34+
if let ItemKind::TyAlias(..) = item.node {
3535
for attr in self.tcx.get_attrs(item_def_id).iter() {
3636
if attr.check_name(sym::rustc_layout) {
3737
self.dump_layout_of(item_def_id, item, attr);

src/librustc_privacy/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
534534
hir::ItemKind::Static(..) | hir::ItemKind::Struct(..) |
535535
hir::ItemKind::Trait(..) | hir::ItemKind::TraitAlias(..) |
536536
hir::ItemKind::OpaqueTy(..) |
537-
hir::ItemKind::Ty(..) | hir::ItemKind::Union(..) | hir::ItemKind::Use(..) => {
537+
hir::ItemKind::TyAlias(..) | hir::ItemKind::Union(..) | hir::ItemKind::Use(..) => {
538538
if item.vis.node.is_pub() { self.prev_level } else { None }
539539
}
540540
};
@@ -589,7 +589,7 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
589589
hir::ItemKind::Static(..) |
590590
hir::ItemKind::Const(..) |
591591
hir::ItemKind::GlobalAsm(..) |
592-
hir::ItemKind::Ty(..) |
592+
hir::ItemKind::TyAlias(..) |
593593
hir::ItemKind::Mod(..) |
594594
hir::ItemKind::TraitAlias(..) |
595595
hir::ItemKind::Fn(..) |
@@ -621,7 +621,7 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
621621
}
622622
// Visit everything.
623623
hir::ItemKind::Const(..) | hir::ItemKind::Static(..) |
624-
hir::ItemKind::Fn(..) | hir::ItemKind::Ty(..) => {
624+
hir::ItemKind::Fn(..) | hir::ItemKind::TyAlias(..) => {
625625
if item_level.is_some() {
626626
self.reach(item.hir_id, item_level).generics().predicates().ty();
627627
}
@@ -1458,7 +1458,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
14581458

14591459
// `type ... = ...;` can contain private types, because
14601460
// we're introducing a new name.
1461-
hir::ItemKind::Ty(..) => return,
1461+
hir::ItemKind::TyAlias(..) => return,
14621462

14631463
// Not at all public, so we don't care.
14641464
_ if !self.item_is_public(&item.hir_id, &item.vis) => {
@@ -1739,7 +1739,7 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
17391739
hir::ItemKind::GlobalAsm(..) => {}
17401740
// Subitems of these items have inherited publicity.
17411741
hir::ItemKind::Const(..) | hir::ItemKind::Static(..) |
1742-
hir::ItemKind::Fn(..) | hir::ItemKind::Ty(..) => {
1742+
hir::ItemKind::Fn(..) | hir::ItemKind::TyAlias(..) => {
17431743
self.check(item.hir_id, item_visibility).generics().predicates().ty();
17441744
}
17451745
hir::ItemKind::OpaqueTy(..) => {

src/librustc_resolve/build_reduced_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ impl<'a> Resolver<'a> {
459459
}
460460

461461
// These items live in the type namespace.
462-
ItemKind::Ty(..) => {
462+
ItemKind::TyAlias(..) => {
463463
let res = Res::Def(DefKind::TyAlias, self.definitions.local_def_id(item.id));
464464
self.define(parent, ident, TypeNS, (res, vis, sp, expansion));
465465
}

src/librustc_resolve/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2709,7 +2709,7 @@ impl<'a> Resolver<'a> {
27092709
debug!("(resolving item) resolving {} ({:?})", name, item.node);
27102710

27112711
match item.node {
2712-
ItemKind::Ty(_, ref generics) |
2712+
ItemKind::TyAlias(_, ref generics) |
27132713
ItemKind::OpaqueTy(_, ref generics) |
27142714
ItemKind::Fn(_, _, ref generics, _) => {
27152715
self.with_generic_param_rib(

src/librustc_save_analysis/dump_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
13971397
self.process_mod(item);
13981398
visit::walk_mod(self, m);
13991399
}
1400-
Ty(ref ty, ref ty_params) => {
1400+
TyAlias(ref ty, ref ty_params) => {
14011401
let qualname = format!("::{}",
14021402
self.tcx.def_path_str(self.tcx.hir().local_def_id_from_node_id(item.id)));
14031403
let value = ty_to_string(&ty);

src/librustc_save_analysis/sig.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ impl Sig for ast::Item {
438438
refs: vec![],
439439
})
440440
}
441-
ast::ItemKind::Ty(ref ty, ref generics) => {
441+
ast::ItemKind::TyAlias(ref ty, ref generics) => {
442442
let text = "type ".to_owned();
443443
let mut sig = name_and_generics(text, offset, generics, self.id, self.ident, scx)?;
444444

src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ pub fn check_item_type<'tcx>(tcx: TyCtxt<'tcx>, it: &'tcx hir::Item) {
14091409
let substs = InternalSubsts::identity_for_item(tcx, def_id);
14101410
check_opaque(tcx, def_id, substs, it.span, &origin);
14111411
}
1412-
hir::ItemKind::Ty(..) => {
1412+
hir::ItemKind::TyAlias(..) => {
14131413
let def_id = tcx.hir().local_def_id(it.hir_id);
14141414
let pty_ty = tcx.type_of(def_id);
14151415
let generics = tcx.generics_of(def_id);

src/librustc_typeck/collect.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ fn type_param_predicates(
293293
match item.node {
294294
ItemKind::Fn(.., ref generics, _)
295295
| ItemKind::Impl(_, _, _, ref generics, ..)
296-
| ItemKind::Ty(_, ref generics)
296+
| ItemKind::TyAlias(_, ref generics)
297297
| ItemKind::OpaqueTy(OpaqueTy {
298298
ref generics,
299299
impl_trait_fn: None,
@@ -462,7 +462,7 @@ fn convert_item(tcx: TyCtxt<'_>, item_id: hir::HirId) {
462462
}) => {}
463463

464464
hir::ItemKind::OpaqueTy(..)
465-
| hir::ItemKind::Ty(..)
465+
| hir::ItemKind::TyAlias(..)
466466
| hir::ItemKind::Static(..)
467467
| hir::ItemKind::Const(..)
468468
| hir::ItemKind::Fn(..) => {
@@ -917,7 +917,7 @@ fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::Generics {
917917
generics
918918
}
919919

920-
ItemKind::Ty(_, ref generics)
920+
ItemKind::TyAlias(_, ref generics)
921921
| ItemKind::Enum(_, ref generics)
922922
| ItemKind::Struct(_, ref generics)
923923
| ItemKind::OpaqueTy(hir::OpaqueTy { ref generics, .. })
@@ -1242,7 +1242,7 @@ pub fn checked_type_of(tcx: TyCtxt<'_>, def_id: DefId, fail: bool) -> Option<Ty<
12421242
icx.to_ty(ty)
12431243
}
12441244
},
1245-
ItemKind::Ty(ref ty, _)
1245+
ItemKind::TyAlias(ref ty, _)
12461246
| ItemKind::Impl(.., ref ty, _) => icx.to_ty(ty),
12471247
ItemKind::Fn(..) => {
12481248
let substs = InternalSubsts::identity_for_item(tcx, def_id);
@@ -2038,7 +2038,7 @@ fn explicit_predicates_of(
20382038
generics
20392039
}
20402040
ItemKind::Fn(.., ref generics, _)
2041-
| ItemKind::Ty(_, ref generics)
2041+
| ItemKind::TyAlias(_, ref generics)
20422042
| ItemKind::Enum(_, ref generics)
20432043
| ItemKind::Struct(_, ref generics)
20442044
| ItemKind::Union(_, ref generics) => generics,

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2802,7 +2802,7 @@ impl Clean<Type> for hir::Ty {
28022802
}
28032803
};
28042804

2805-
if let Some(&hir::ItemKind::Ty(ref ty, ref generics)) = alias {
2805+
if let Some(&hir::ItemKind::TyAlias(ref ty, ref generics)) = alias {
28062806
let provided_params = &path.segments.last().expect("segments were empty");
28072807
let mut ty_substs = FxHashMap::default();
28082808
let mut lt_substs = FxHashMap::default();

0 commit comments

Comments
 (0)