From 3bea2ca49d24606920b3a81811379debc0668992 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Sun, 17 Feb 2019 19:42:36 -0800 Subject: Use more impl header lifetime elision There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime. --- src/libstd/panic.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/panic.rs') diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index d27f6ca88c2..8a15edcdef6 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -199,9 +199,9 @@ pub struct AssertUnwindSafe( // * Our custom AssertUnwindSafe wrapper is indeed unwind safe #[stable(feature = "catch_unwind", since = "1.9.0")] -impl<'a, T: ?Sized> !UnwindSafe for &'a mut T {} +impl !UnwindSafe for &mut T {} #[stable(feature = "catch_unwind", since = "1.9.0")] -impl<'a, T: RefUnwindSafe + ?Sized> UnwindSafe for &'a T {} +impl UnwindSafe for &T {} #[stable(feature = "catch_unwind", since = "1.9.0")] impl UnwindSafe for *const T {} #[stable(feature = "catch_unwind", since = "1.9.0")] @@ -320,7 +320,7 @@ impl fmt::Debug for AssertUnwindSafe { } #[unstable(feature = "futures_api", issue = "50547")] -impl<'a, F: Future> Future for AssertUnwindSafe { +impl Future for AssertUnwindSafe { type Output = F::Output; fn poll(self: Pin<&mut Self>, lw: &LocalWaker) -> Poll { -- cgit 1.4.1-3-g733a5