We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
OpaqueTy
1 parent e2fa952 commit 6b619b1Copy full SHA for 6b619b1
src/libsyntax/ast.rs
@@ -1554,7 +1554,6 @@ pub enum ImplItemKind {
1554
Const(P<Ty>, P<Expr>),
1555
Method(FnSig, P<Block>),
1556
TyAlias(P<Ty>),
1557
- OpaqueTy(GenericBounds),
1558
Macro(Mac),
1559
}
1560
@@ -2448,10 +2447,6 @@ pub enum ItemKind {
2448
2447
///
2449
/// E.g., `type Foo = Bar<u8>;`.
2450
TyAlias(P<Ty>, Generics),
2451
- /// An opaque `impl Trait` type alias.
2452
- ///
2453
- /// E.g., `type Foo = impl Bar + Boo;`.
2454
- OpaqueTy(GenericBounds, Generics),
2455
/// An enum definition (`enum`).
2456
2457
/// E.g., `enum Foo<A, B> { C<A>, D<B> }`.
@@ -2505,7 +2500,6 @@ impl ItemKind {
2505
2500
ItemKind::ForeignMod(..) => "foreign module",
2506
2501
ItemKind::GlobalAsm(..) => "global asm",
2507
2502
ItemKind::TyAlias(..) => "type alias",
2508
- ItemKind::OpaqueTy(..) => "opaque type",
2509
2503
ItemKind::Enum(..) => "enum",
2510
2504
ItemKind::Struct(..) => "struct",
2511
ItemKind::Union(..) => "union",
src/libsyntax/mut_visit.rs
@@ -887,10 +887,6 @@ pub fn noop_visit_item_kind<T: MutVisitor>(kind: &mut ItemKind, vis: &mut T) {
887
vis.visit_ty(ty);
888
vis.visit_generics(generics);
889
890
- ItemKind::OpaqueTy(bounds, generics) => {
891
- visit_bounds(bounds, vis);
892
- vis.visit_generics(generics);
893
- }
894
ItemKind::Enum(EnumDef { variants }, generics) => {
895
variants.flat_map_in_place(|variant| vis.flat_map_variant(variant));
896
@@ -970,7 +966,6 @@ pub fn noop_flat_map_impl_item<T: MutVisitor>(mut item: ImplItem, visitor: &mut
970
966
visitor.visit_block(body);
971
967
972
968
ImplItemKind::TyAlias(ty) => visitor.visit_ty(ty),
973
- ImplItemKind::OpaqueTy(bounds) => visit_bounds(bounds, visitor),
974
969
ImplItemKind::Macro(mac) => visitor.visit_mac(mac),
975
976
visitor.visit_span(span);
src/libsyntax/print/pprust.rs
@@ -1255,19 +1255,6 @@ impl<'a> State<'a> {
1255
self.s.word(";");
1256
self.end(); // end the outer ibox
1257
1258
- ast::ItemKind::OpaqueTy(ref bounds, ref generics) => {
1259
- self.head(visibility_qualified(&item.vis, "type"));
1260
- self.print_ident(item.ident);
1261
- self.word_space("= impl");
1262
- self.print_generic_params(&generics.params);
1263
- self.end(); // end the inner ibox
1264
-
1265
- self.print_where_clause(&generics.where_clause);
1266
- self.s.space();
1267
- self.print_type_bounds(":", bounds);
1268
- self.s.word(";");
1269
- self.end(); // end the outer ibox
1270
1271
ast::ItemKind::Enum(ref enum_definition, ref params) => {
1272
self.print_enum_def(
1273
enum_definition,
@@ -1620,13 +1607,6 @@ impl<'a> State<'a> {
1620
1607
ast::ImplItemKind::TyAlias(ref ty) => {
1621
1608
self.print_associated_type(ii.ident, None, Some(ty));
1622
1609
1623
- ast::ImplItemKind::OpaqueTy(ref bounds) => {
1624
- self.word_space("type");
1625
- self.print_ident(ii.ident);
1626
1627
1628
1629
1630
1610
ast::ImplItemKind::Macro(ref mac) => {
1631
1611
self.print_mac(mac);
1632
1612
match mac.delim {
src/libsyntax/visit.rs
@@ -263,10 +263,6 @@ pub fn walk_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a Item) {
263
visitor.visit_ty(typ);
264
visitor.visit_generics(generics)
265
266
- ItemKind::OpaqueTy(ref bounds, ref generics) => {
267
- walk_list!(visitor, visit_param_bound, bounds);
268
- visitor.visit_generics(generics)
269
270
ItemKind::Enum(ref enum_definition, ref generics) => {
271
visitor.visit_generics(generics);
272
visitor.visit_enum_def(enum_definition, generics, item.id, item.span)
@@ -628,9 +624,6 @@ pub fn walk_impl_item<'a, V: Visitor<'a>>(visitor: &mut V, impl_item: &'a ImplIt
628
624
ImplItemKind::TyAlias(ref ty) => {
629
625
visitor.visit_ty(ty);
630
626
631
- ImplItemKind::OpaqueTy(ref bounds) => {
632
633
634
627
ImplItemKind::Macro(ref mac) => {
635
visitor.visit_mac(mac);
636
0 commit comments