about summary refs log tree commit diff
path: root/src/librustc_save_analysis
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-16 17:28:40 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-12-20 22:22:44 +0100
commita7aec3f207fb40f0c4c857fb91a03372ac8bcd69 (patch)
treee38449760063595a6d65b15f5beadbf8d76094d4 /src/librustc_save_analysis
parent01a46509a4c2dc430ebebf940a26232fdaeeba81 (diff)
downloadrust-a7aec3f207fb40f0c4c857fb91a03372ac8bcd69.tar.gz
rust-a7aec3f207fb40f0c4c857fb91a03372ac8bcd69.zip
1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.
2. mir::Mutability -> ast::Mutability.
Diffstat (limited to 'src/librustc_save_analysis')
-rw-r--r--src/librustc_save_analysis/lib.rs2
-rw-r--r--src/librustc_save_analysis/sig.rs10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs
index 424d57c8fe7..0509748020a 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -985,7 +985,7 @@ impl<'l> Visitor<'l> for PathCollector<'l> {
                     // Even if the ref is mut, you can't change the ref, only
                     // the data pointed at, so showing the initialising expression
                     // is still worthwhile.
-                    ast::BindingMode::ByRef(_) => ast::Mutability::Immutable,
+                    ast::BindingMode::ByRef(_) => ast::Mutability::Not,
                     ast::BindingMode::ByValue(mt) => mt,
                 };
                 self.collected_idents
diff --git a/src/librustc_save_analysis/sig.rs b/src/librustc_save_analysis/sig.rs
index 255938a193c..d1ac0ac210e 100644
--- a/src/librustc_save_analysis/sig.rs
+++ b/src/librustc_save_analysis/sig.rs
@@ -175,8 +175,8 @@ impl Sig for ast::Ty {
             }
             ast::TyKind::Ptr(ref mt) => {
                 let prefix = match mt.mutbl {
-                    ast::Mutability::Mutable => "*mut ",
-                    ast::Mutability::Immutable => "*const ",
+                    ast::Mutability::Mut => "*mut ",
+                    ast::Mutability::Not => "*const ",
                 };
                 let nested = mt.ty.make(offset + prefix.len(), id, scx)?;
                 let text = format!("{}{}", prefix, nested.text);
@@ -188,7 +188,7 @@ impl Sig for ast::Ty {
                     prefix.push_str(&l.ident.to_string());
                     prefix.push(' ');
                 }
-                if let ast::Mutability::Mutable = mt.mutbl {
+                if let ast::Mutability::Mut = mt.mutbl {
                     prefix.push_str("mut ");
                 };
 
@@ -330,7 +330,7 @@ impl Sig for ast::Item {
         match self.kind {
             ast::ItemKind::Static(ref ty, m, ref expr) => {
                 let mut text = "static ".to_owned();
-                if m == ast::Mutability::Mutable {
+                if m == ast::Mutability::Mut {
                     text.push_str("mut ");
                 }
                 let name = self.ident.to_string();
@@ -787,7 +787,7 @@ impl Sig for ast::ForeignItem {
             }
             ast::ForeignItemKind::Static(ref ty, m) => {
                 let mut text = "static ".to_owned();
-                if m == ast::Mutability::Mutable {
+                if m == ast::Mutability::Mut {
                     text.push_str("mut ");
                 }
                 let name = self.ident.to_string();