about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2019-08-06 00:41:16 +0200
committerSantiago Pastorino <spastorino@gmail.com>2019-08-06 00:41:16 +0200
commitf85fc7168c0fb3d3f52eb66fe601571d7b1e4e67 (patch)
treebe5c7ed26e60b46ff8fb44e58b7458915bdd406b
parentf6ecdc2f61b96de199be956cad853a7c02bcfb58 (diff)
downloadrust-f85fc7168c0fb3d3f52eb66fe601571d7b1e4e67.tar.gz
rust-f85fc7168c0fb3d3f52eb66fe601571d7b1e4e67.zip
PlaceRef's base is already a reference
-rw-r--r--src/librustc_mir/borrow_check/error_reporting.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/librustc_mir/borrow_check/error_reporting.rs b/src/librustc_mir/borrow_check/error_reporting.rs
index c767279dd8c..99899aa390c 100644
--- a/src/librustc_mir/borrow_check/error_reporting.rs
+++ b/src/librustc_mir/borrow_check/error_reporting.rs
@@ -177,7 +177,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                 buf.push_str(&self.infcx.tcx.item_name(*def_id).to_string());
             }
             PlaceRef {
-                ref base,
+                base,
                 projection: Some(ref proj),
             } => {
                 match proj.elem {
@@ -197,7 +197,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                                 // FIXME turn this recursion into iteration
                                 self.append_place_to_string(
                                     PlaceRef {
-                                        base: &base,
+                                        base,
                                         projection: &proj.base,
                                     },
                                     buf,
@@ -210,7 +210,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                                         if self.body.local_decls[*local].is_ref_for_guard() {
                                             self.append_place_to_string(
                                                 PlaceRef {
-                                                    base: &base,
+                                                    base,
                                                     projection: &proj.base,
                                                 },
                                                 buf,
@@ -222,7 +222,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                                             buf.push_str(&"*");
                                             self.append_place_to_string(
                                                 PlaceRef {
-                                                    base: &base,
+                                                    base,
                                                     projection: &proj.base,
                                                 },
                                                 buf,
@@ -236,7 +236,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                                         buf.push_str(&"*");
                                         self.append_place_to_string(
                                             PlaceRef {
-                                                base: &base,
+                                                base,
                                                 projection: &proj.base,
                                             },
                                             buf,
@@ -251,7 +251,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                     ProjectionElem::Downcast(..) => {
                         self.append_place_to_string(
                             PlaceRef {
-                                base: &base,
+                                base,
                                 projection: &proj.base,
                             },
                             buf,
@@ -273,12 +273,12 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                             buf.push_str(&name);
                         } else {
                             let field_name = self.describe_field(PlaceRef {
-                                base: base,
+                                base,
                                 projection: &proj.base,
                             }, field);
                             self.append_place_to_string(
                                 PlaceRef {
-                                    base: &base,
+                                    base,
                                     projection: &proj.base,
                                 },
                                 buf,
@@ -293,7 +293,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
 
                         self.append_place_to_string(
                             PlaceRef {
-                                base: &base,
+                                base,
                                 projection: &proj.base,
                             },
                             buf,
@@ -313,7 +313,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                         // to avoid confusing the end-user
                         self.append_place_to_string(
                             PlaceRef {
-                                base: &base,
+                                base,
                                 projection: &proj.base,
                             },
                             buf,