File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -750,9 +750,7 @@ impl<'a, 'tcx> FnType<'tcx> {
750
750
Some ( ty. boxed_ty ( ) )
751
751
}
752
752
753
- ty:: TyRef ( b, mt) => {
754
- use rustc:: ty:: { BrAnon , ReLateBound } ;
755
-
753
+ ty:: TyRef ( _, mt) => {
756
754
// `&mut` pointer parameters never alias other parameters, or mutable global data
757
755
//
758
756
// `&T` where `T` contains no `UnsafeCell<U>` is immutable, and can be marked as
@@ -768,13 +766,6 @@ impl<'a, 'tcx> FnType<'tcx> {
768
766
arg. attrs . set ( ArgAttribute :: ReadOnly ) ;
769
767
}
770
768
771
- // When a reference in an argument has no named lifetime, it's
772
- // impossible for that reference to escape this function
773
- // (returned or stored beyond the call by a closure).
774
- if let ReLateBound ( _, BrAnon ( _) ) = * b {
775
- arg. attrs . set ( ArgAttribute :: NoCapture ) ;
776
- }
777
-
778
769
Some ( mt. ty )
779
770
}
780
771
_ => None
You can’t perform that action at this time.
0 commit comments