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<R: Read + ?Sized> 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.
This commit is contained in:
parent
16ca0b9f63
commit
3bea2ca49d
35 changed files with 219 additions and 219 deletions
|
@ -199,9 +199,9 @@ pub struct AssertUnwindSafe<T>(
|
|||
// * 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<T: ?Sized> !UnwindSafe for &mut T {}
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
impl<'a, T: RefUnwindSafe + ?Sized> UnwindSafe for &'a T {}
|
||||
impl<T: RefUnwindSafe + ?Sized> UnwindSafe for &T {}
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
impl<T: RefUnwindSafe + ?Sized> UnwindSafe for *const T {}
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
|
@ -320,7 +320,7 @@ impl<T: fmt::Debug> fmt::Debug for AssertUnwindSafe<T> {
|
|||
}
|
||||
|
||||
#[unstable(feature = "futures_api", issue = "50547")]
|
||||
impl<'a, F: Future> Future for AssertUnwindSafe<F> {
|
||||
impl<F: Future> Future for AssertUnwindSafe<F> {
|
||||
type Output = F::Output;
|
||||
|
||||
fn poll(self: Pin<&mut Self>, lw: &LocalWaker) -> Poll<Self::Output> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue