about summary refs log tree commit diff
path: root/src/librustc/traits
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2019-11-09 17:44:11 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2019-11-10 12:21:05 +0100
commited640c6a27aca3b2446ab8d6f00df0a2d78f1192 (patch)
tree16c570be6f3cdb3cb4d20dde9588d59d00ed502b /src/librustc/traits
parent57a5f92bef4b459005920f1aeff05a52c7e356b0 (diff)
downloadrust-ed640c6a27aca3b2446ab8d6f00df0a2d78f1192.tar.gz
rust-ed640c6a27aca3b2446ab8d6f00df0a2d78f1192.zip
Merge hir::Mutability into ast::Mutability.
Diffstat (limited to 'src/librustc/traits')
-rw-r--r--src/librustc/traits/error_reporting.rs6
-rw-r--r--src/librustc/traits/select.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs
index 23c4ec062ea..f77db962135 100644
--- a/src/librustc/traits/error_reporting.rs
+++ b/src/librustc/traits/error_reporting.rs
@@ -1385,8 +1385,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
 
             if let ty::Ref(region, t_type, mutability) = trait_ref.skip_binder().self_ty().kind {
                 let trait_type = match mutability {
-                    hir::Mutability::MutMutable => self.tcx.mk_imm_ref(region, t_type),
-                    hir::Mutability::MutImmutable => self.tcx.mk_mut_ref(region, t_type),
+                    hir::Mutability::Mutable => self.tcx.mk_imm_ref(region, t_type),
+                    hir::Mutability::Immutable => self.tcx.mk_mut_ref(region, t_type),
                 };
 
                 let substs = self.tcx.mk_substs_trait(&trait_type, &[]);
@@ -1403,7 +1403,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
                     let sp = self.tcx.sess.source_map()
                         .span_take_while(span, |c| c.is_whitespace() || *c == '&');
                     if points_at_arg &&
-                        mutability == hir::Mutability::MutImmutable &&
+                        mutability == hir::Mutability::Immutable &&
                         refs_number > 0
                     {
                         err.span_suggestion(
diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs
index d8a27f1e040..f5ac1533d06 100644
--- a/src/librustc/traits/select.rs
+++ b/src/librustc/traits/select.rs
@@ -2652,7 +2652,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
             | ty::Char
             | ty::RawPtr(..)
             | ty::Never
-            | ty::Ref(_, _, hir::MutImmutable) => {
+            | ty::Ref(_, _, hir::Mutability::Immutable) => {
                 // Implementations provided in libcore
                 None
             }
@@ -2663,7 +2663,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
             | ty::Generator(..)
             | ty::GeneratorWitness(..)
             | ty::Foreign(..)
-            | ty::Ref(_, _, hir::MutMutable) => None,
+            | ty::Ref(_, _, hir::Mutability::Mutable) => None,
 
             ty::Array(element_ty, _) => {
                 // (*) binder moved here