summary refs log tree commit diff
path: root/src/libsyntax/print
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-08-01 00:41:54 +0100
committervarkor <github@varkor.com>2019-08-02 02:44:36 +0100
commitc28ce3e4ca021aea5ca25227c0e46d9b47095db6 (patch)
treebaae77321295ecfd9077bc52342ea5ba78cc9eec /src/libsyntax/print
parentfc48541ab19cdd68a2b0228004e64d3cbb7a1ecb (diff)
downloadrust-c28ce3e4ca021aea5ca25227c0e46d9b47095db6.tar.gz
rust-c28ce3e4ca021aea5ca25227c0e46d9b47095db6.zip
Replace "existential" by "opaque"
Diffstat (limited to 'src/libsyntax/print')
-rw-r--r--src/libsyntax/print/pprust.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 88ff6ee9071..fec149f97a7 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -1238,9 +1238,10 @@ impl<'a> State<'a> {
                 self.s.word(";");
                 self.end(); // end the outer ibox
             }
-            ast::ItemKind::Existential(ref bounds, ref generics) => {
-                self.head(visibility_qualified(&item.vis, "existential type"));
+            ast::ItemKind::OpaqueTy(ref bounds, ref generics) => {
+                self.head(visibility_qualified(&item.vis, "type"));
                 self.print_ident(item.ident);
+                self.word_space("= impl");
                 self.print_generic_params(&generics.params);
                 self.end(); // end the inner ibox
 
@@ -1598,9 +1599,12 @@ impl<'a> State<'a> {
             ast::ImplItemKind::Type(ref ty) => {
                 self.print_associated_type(ii.ident, None, Some(ty));
             }
-            ast::ImplItemKind::Existential(ref bounds) => {
-                self.word_space("existential");
-                self.print_associated_type(ii.ident, Some(bounds), None);
+            ast::ImplItemKind::OpaqueTy(ref bounds) => {
+                self.word_space("type");
+                self.print_ident(ii.ident);
+                self.word_space("= impl");
+                self.print_type_bounds(":", bounds);
+                self.s.word(";");
             }
             ast::ImplItemKind::Macro(ref mac) => {
                 self.print_mac(mac);