about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorOliver 'ker' Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-09 17:44:47 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-11 12:34:48 +0100
commit73fa9b2da2ee82c91a5c8d605b91f22f19e4d74b (patch)
treec860b482cbc076ac8a87745b5b8f23b88c49d25d /src/libsyntax/print/pprust.rs
parent14e09ad4686bb20a98acfd7d930386f6330d2b4d (diff)
downloadrust-73fa9b2da2ee82c91a5c8d605b91f22f19e4d74b.tar.gz
rust-73fa9b2da2ee82c91a5c8d605b91f22f19e4d74b.zip
[breaking-change] don't glob export ast::Mutablity variants
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-rw-r--r--src/libsyntax/print/pprust.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 8495853c2c9..b14117c9704 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -417,7 +417,7 @@ pub fn lit_to_string(l: &ast::Lit) -> String {
 }
 
 pub fn explicit_self_to_string(explicit_self: &ast::SelfKind) -> String {
-    to_string(|s| s.print_explicit_self(explicit_self, ast::MutImmutable).map(|_| {}))
+    to_string(|s| s.print_explicit_self(explicit_self, ast::Mutability::Immutable).map(|_| {}))
 }
 
 pub fn variant_to_string(var: &ast::Variant) -> String {
@@ -965,8 +965,8 @@ impl<'a> State<'a> {
             ast::TyKind::Ptr(ref mt) => {
                 try!(word(&mut self.s, "*"));
                 match mt.mutbl {
-                    ast::MutMutable => try!(self.word_nbsp("mut")),
-                    ast::MutImmutable => try!(self.word_nbsp("const")),
+                    ast::Mutability::Mutable => try!(self.word_nbsp("mut")),
+                    ast::Mutability::Immutable => try!(self.word_nbsp("const")),
                 }
                 try!(self.print_type(&*mt.ty));
             }
@@ -1147,7 +1147,7 @@ impl<'a> State<'a> {
             ast::ItemKind::Static(ref ty, m, ref expr) => {
                 try!(self.head(&visibility_qualified(item.vis,
                                                     "static")));
-                if m == ast::MutMutable {
+                if m == ast::Mutability::Mutable {
                     try!(self.word_space("mut"));
                 }
                 try!(self.print_ident(item.ident));
@@ -2464,8 +2464,8 @@ impl<'a> State<'a> {
                         try!(self.word_nbsp("ref"));
                         try!(self.print_mutability(mutbl));
                     }
-                    ast::BindingMode::ByValue(ast::MutImmutable) => {}
-                    ast::BindingMode::ByValue(ast::MutMutable) => {
+                    ast::BindingMode::ByValue(ast::Mutability::Immutable) => {}
+                    ast::BindingMode::ByValue(ast::Mutability::Mutable) => {
                         try!(self.word_nbsp("mut"));
                     }
                 }
@@ -2534,7 +2534,7 @@ impl<'a> State<'a> {
             }
             ast::PatRegion(ref inner, mutbl) => {
                 try!(word(&mut self.s, "&"));
-                if mutbl == ast::MutMutable {
+                if mutbl == ast::Mutability::Mutable {
                     try!(word(&mut self.s, "mut "));
                 }
                 try!(self.print_pat(&**inner));
@@ -2669,10 +2669,10 @@ impl<'a> State<'a> {
         let mut first = true;
         if let Some(explicit_self) = opt_explicit_self {
             let m = match *explicit_self {
-                ast::SelfKind::Static => ast::MutImmutable,
+                ast::SelfKind::Static => ast::Mutability::Immutable,
                 _ => match decl.inputs[0].pat.node {
                     ast::PatIdent(ast::BindingMode::ByValue(m), _, _) => m,
-                    _ => ast::MutImmutable
+                    _ => ast::Mutability::Immutable
                 }
             };
             first = !try!(self.print_explicit_self(explicit_self, m));
@@ -2946,8 +2946,8 @@ impl<'a> State<'a> {
     pub fn print_mutability(&mut self,
                             mutbl: ast::Mutability) -> io::Result<()> {
         match mutbl {
-            ast::MutMutable => self.word_nbsp("mut"),
-            ast::MutImmutable => Ok(()),
+            ast::Mutability::Mutable => self.word_nbsp("mut"),
+            ast::Mutability::Immutable => Ok(()),
         }
     }