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 a2491ee commit 6a49b52Copy full SHA for 6a49b52
src/libsyntax/ast.rs
@@ -1579,7 +1579,6 @@ pub enum ImplItemKind {
1579
Const(P<Ty>, P<Expr>),
1580
Method(FnSig, P<Block>),
1581
TyAlias(P<Ty>),
1582
- OpaqueTy(GenericBounds),
1583
Macro(Mac),
1584
}
1585
@@ -2483,10 +2482,6 @@ pub enum ItemKind {
2483
2482
///
2484
/// E.g., `type Foo = Bar<u8>;`.
2485
TyAlias(P<Ty>, Generics),
2486
- /// An opaque `impl Trait` type alias.
2487
- ///
2488
- /// E.g., `type Foo = impl Bar + Boo;`.
2489
- OpaqueTy(GenericBounds, Generics),
2490
/// An enum definition (`enum`).
2491
2492
/// E.g., `enum Foo<A, B> { C<A>, D<B> }`.
@@ -2540,7 +2535,6 @@ impl ItemKind {
2540
2535
ItemKind::ForeignMod(..) => "foreign module",
2541
2536
ItemKind::GlobalAsm(..) => "global asm",
2542
2537
ItemKind::TyAlias(..) => "type alias",
2543
- ItemKind::OpaqueTy(..) => "opaque type",
2544
2538
ItemKind::Enum(..) => "enum",
2545
2539
ItemKind::Struct(..) => "struct",
2546
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