]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/nll/explain_borrow/mod.rs
Rollup merge of #62806 - mati865:clippy, r=TimNN
[rust.git] / src / librustc_mir / borrow_check / nll / explain_borrow / mod.rs
index d4ae15467bed29380111ecbfac1d291000665721..aba3ef1cbbfc9a64ec41f9e2ee9f0bbdd2f77898 100644 (file)
@@ -252,7 +252,7 @@ pub(in crate::borrow_check) fn explain_why_borrow_contains_point(
             Some(Cause::LiveVar(local, location)) => {
                 let span = body.source_info(location).span;
                 let spans = self
-                    .move_spans(&Place::from(local), location)
+                    .move_spans(Place::from(local).as_ref(), location)
                     .or_else(|| self.borrow_spans(span, location));
 
                 let borrow_location = location;
@@ -304,7 +304,8 @@ pub(in crate::borrow_check) fn explain_why_borrow_contains_point(
                             region,
                         );
                     if let Some(region_name) = region_name {
-                        let opt_place_desc = self.describe_place(&borrow.borrowed_place);
+                        let opt_place_desc =
+                            self.describe_place(borrow.borrowed_place.as_ref());
                         BorrowExplanation::MustBeValidFor {
                             category,
                             from_closure,