diff options
| author | varkor <github@varkor.com> | 2019-08-02 11:02:08 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-08-04 20:13:37 +0100 |
| commit | 8aa45c65d897570696830ea0675fa2faa989c536 (patch) | |
| tree | 79e51869df46d4fc4b6e8ad253c46a0fe59e66df /src/libsyntax | |
| parent | 460072ebeed5a2463109894592ac172b47cdfb74 (diff) | |
| download | rust-8aa45c65d897570696830ea0675fa2faa989c536.tar.gz rust-8aa45c65d897570696830ea0675fa2faa989c536.zip | |
Rename `ItemKind::Ty` to `ItemKind::TyAlias`
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/build.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/mut_visit.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/visit.rs | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 246c8f4b91f..c8fb19f9eb5 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -2345,7 +2345,7 @@ pub enum ItemKind { /// A type alias (`type` or `pub type`). /// /// E.g., `type Foo = Bar<u8>;`. - Ty(P<Ty>, Generics), + TyAlias(P<Ty>, Generics), /// An opaque `impl Trait` type alias. /// /// E.g., `type Foo = impl Bar + Boo;`. @@ -2402,7 +2402,7 @@ impl ItemKind { ItemKind::Mod(..) => "module", ItemKind::ForeignMod(..) => "foreign module", ItemKind::GlobalAsm(..) => "global asm", - ItemKind::Ty(..) => "type alias", + ItemKind::TyAlias(..) => "type alias", ItemKind::OpaqueTy(..) => "opaque type", ItemKind::Enum(..) => "enum", ItemKind::Struct(..) => "struct", diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index b4b15ba31b7..59e13fdc8f1 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -858,7 +858,7 @@ impl<'a> ExtCtxt<'a> { pub fn item_ty_poly(&self, span: Span, name: Ident, ty: P<ast::Ty>, generics: Generics) -> P<ast::Item> { - self.item(span, name, Vec::new(), ast::ItemKind::Ty(ty, generics)) + self.item(span, name, Vec::new(), ast::ItemKind::TyAlias(ty, generics)) } pub fn item_ty(&self, span: Span, name: Ident, ty: P<ast::Ty>) -> P<ast::Item> { diff --git a/src/libsyntax/mut_visit.rs b/src/libsyntax/mut_visit.rs index 176bcf1959a..8fac2f30a51 100644 --- a/src/libsyntax/mut_visit.rs +++ b/src/libsyntax/mut_visit.rs @@ -847,7 +847,7 @@ pub fn noop_visit_item_kind<T: MutVisitor>(kind: &mut ItemKind, vis: &mut T) { ItemKind::Mod(m) => vis.visit_mod(m), ItemKind::ForeignMod(nm) => vis.visit_foreign_mod(nm), ItemKind::GlobalAsm(_ga) => {} - ItemKind::Ty(ty, generics) => { + ItemKind::TyAlias(ty, generics) => { vis.visit_ty(ty); vis.visit_generics(generics); } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 880dd6e1649..64acba9e40e 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -7243,7 +7243,7 @@ impl<'a> Parser<'a> { let (ident, alias, generics) = type_?; // TYPE ITEM let item_ = match alias { - AliasKind::Weak(ty) => ItemKind::Ty(ty, generics), + AliasKind::Weak(ty) => ItemKind::TyAlias(ty, generics), AliasKind::OpaqueTy(bounds) => ItemKind::OpaqueTy(bounds, generics), }; let prev_span = self.prev_span; diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index f3989be45dd..a6c2dd1d925 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1208,7 +1208,7 @@ impl<'a> State<'a> { self.s.word(ga.asm.as_str().to_string()); self.end(); } - ast::ItemKind::Ty(ref ty, ref generics) => { + ast::ItemKind::TyAlias(ref ty, ref generics) => { self.head(visibility_qualified(&item.vis, "type")); self.print_ident(item.ident); self.print_generic_params(&generics.params); diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 67226c2177f..48dc54a4247 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -255,7 +255,7 @@ pub fn walk_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a Item) { walk_list!(visitor, visit_foreign_item, &foreign_module.items); } ItemKind::GlobalAsm(ref ga) => visitor.visit_global_asm(ga), - ItemKind::Ty(ref typ, ref generics) => { + ItemKind::TyAlias(ref typ, ref generics) => { visitor.visit_ty(typ); visitor.visit_generics(generics) } |
