about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgaurikholkar <f2013002@goa.bits-pilani.ac.in>2018-04-06 20:28:00 +0530
committergaurikholkar <f2013002@goa.bits-pilani.ac.in>2018-04-06 20:28:00 +0530
commit6686d104c87891bb1476dfc7036b622fb2ee5210 (patch)
treea7c413ce0c549a525c39450dba288fab0b505a0d
parente6938ee08e687dca9a6ac0f138f00b225e1b9038 (diff)
tidy fix
-rw-r--r--src/librustc_mir/borrow_check/mod.rs35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index 9f84e3469cd..0f529c77aea 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -1592,43 +1592,10 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
                                 },
                             _ => {},
                             }
-                        }, 
+                        },
                         _ => {},
                     }
 
-
-                    // match *place_err {
-                    //     Place::Projection(ref proj) => {
-                    //         match proj.elem {
-                    //             ProjectionElem::Deref => {
-                    //                 match proj.base {
-                    //                     Place::Local(local) => {
-                    //                         let locations = self.mir.find_assignments(local);
-                    //                         if locations.len() > 0 {
-                    //                             let item_msg = if error_reported {
-                    //                                 match self.specialized_description(base){
-                    //                                     Some(msg) => msg,
-                    //                                     None => self.get_main_error_message(place)
-                    //                                 }
-                    //                             } else {
-                    //                                 self.get_main_error_message(place)
-                    //                             };
-                    //                             err_info = Some((
-                    //                                 self.mir.source_info(locations[0]).span,
-                    //                                   "consider changing this to be a \
-                    //                                    mutable reference: `&mut`", item_msg,
-                    //                                    "cannot assign through `&`-reference"));
-                    //                         }
-                    //                     }
-                    //                     _ => {},
-                    //                 }
-                    //             }
-                    //             _ => {}
-                    //         }
-                    //     }
-                    //     _ => {}
-                    // }
-
                     if let Some((err_help_span, err_help_stmt, item_msg, sec_span)) = err_info {
                         let mut err = self.tcx.cannot_assign(span, &item_msg, Origin::Mir, true);
                         err.span_suggestion(err_help_span, err_help_stmt, format!(""));