File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/librustc_mir/borrow_check Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ impl<'tcx> PlaceExt<'tcx> for Place<'tcx> {
5757
5858 if * elem == ProjectionElem :: Deref {
5959 let ty = Place :: ty_from ( & self . base , proj_base, body, tcx) . ty ;
60- match ty. sty {
60+ if let ty :: RawPtr ( .. ) | ty :: Ref ( _ , _ , hir :: MutImmutable ) = ty. sty {
6161 // For both derefs of raw pointers and `&T`
6262 // references, the original path is `Copy` and
6363 // therefore not significant. In particular,
@@ -68,8 +68,7 @@ impl<'tcx> PlaceExt<'tcx> for Place<'tcx> {
6868 // original path into a new variable and
6969 // borrowed *that* one, leaving the original
7070 // path unborrowed.
71- ty:: RawPtr ( ..) | ty:: Ref ( _, _, hir:: MutImmutable ) => return true ,
72- _ => { }
71+ return true ;
7372 }
7473 }
7574 }
You can’t perform that action at this time.
0 commit comments