about summary refs log tree commit diff
path: root/src/libsyntax/print
diff options
context:
space:
mode:
authorOliver 'ker' Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-09 17:57:49 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-11 12:34:48 +0100
commitd844bfb1967b780ff6cc6e81644bf4b529dc0738 (patch)
treec3eb4db434f5c328758aa63bac750dd7646f0d39 /src/libsyntax/print
parentdfe35da6b83f64bb7553b19649839512a3c301ce (diff)
downloadrust-d844bfb1967b780ff6cc6e81644bf4b529dc0738.tar.gz
rust-d844bfb1967b780ff6cc6e81644bf4b529dc0738.zip
[breaking-change] don't glob export ast::Visibility variants
Diffstat (limited to 'src/libsyntax/print')
-rw-r--r--src/libsyntax/print/pprust.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 6e8f0781b4e..78a4bbd962f 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -388,7 +388,7 @@ pub fn fun_to_string(decl: &ast::FnDecl,
     to_string(|s| {
         try!(s.head(""));
         try!(s.print_fn(decl, unsafety, constness, Abi::Rust, Some(name),
-                        generics, opt_explicit_self, ast::Inherited));
+                        generics, opt_explicit_self, ast::Visibility::Inherited));
         try!(s.end()); // Close the head box
         s.end() // Close the outer box
     })
@@ -434,8 +434,8 @@ pub fn mac_to_string(arg: &ast::Mac) -> String {
 
 pub fn visibility_qualified(vis: ast::Visibility, s: &str) -> String {
     match vis {
-        ast::Public => format!("pub {}", s),
-        ast::Inherited => s.to_string()
+        ast::Visibility::Public => format!("pub {}", s),
+        ast::Visibility::Inherited => s.to_string()
     }
 }
 
@@ -1388,8 +1388,8 @@ impl<'a> State<'a> {
 
     pub fn print_visibility(&mut self, vis: ast::Visibility) -> io::Result<()> {
         match vis {
-            ast::Public => self.word_nbsp("pub"),
-            ast::Inherited => Ok(())
+            ast::Visibility::Public => self.word_nbsp("pub"),
+            ast::Visibility::Inherited => Ok(())
         }
     }
 
@@ -1555,13 +1555,13 @@ impl<'a> State<'a> {
             ast::TraitItemKind::Const(ref ty, ref default) => {
                 try!(self.print_associated_const(ti.ident, &ty,
                                                  default.as_ref().map(|expr| &**expr),
-                                                 ast::Inherited));
+                                                 ast::Visibility::Inherited));
             }
             ast::TraitItemKind::Method(ref sig, ref body) => {
                 if body.is_some() {
                     try!(self.head(""));
                 }
-                try!(self.print_method_sig(ti.ident, sig, ast::Inherited));
+                try!(self.print_method_sig(ti.ident, sig, ast::Visibility::Inherited));
                 if let Some(ref body) = *body {
                     try!(self.nbsp());
                     try!(self.print_block_with_attrs(body, &ti.attrs));
@@ -3030,7 +3030,7 @@ impl<'a> State<'a> {
                            name,
                            &generics,
                            opt_explicit_self,
-                           ast::Inherited));
+                           ast::Visibility::Inherited));
         self.end()
     }