Skip to content

Commit 0f2c404

Browse files
committed
Loosen some unnecessary impl bounds
1 parent 21dd781 commit 0f2c404

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/encode.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ External crates cannot implement Encode for pointers or Optionals, but they
8686
As a workaround, we provide implementations for these types that return the
8787
same encoding as references.
8888
*/
89-
unsafe impl<T: 'static> Encode for *const T where for<'a> &'a T: Encode {
90-
const ENCODING: Encoding<'static> = <&T as Encode>::ENCODING;
89+
unsafe impl<T> Encode for *const T where for<'b> &'b T: Encode {
90+
const ENCODING: Encoding<'static> = <&T>::ENCODING;
9191
}
9292

93-
unsafe impl<T: 'static> Encode for *mut T where for<'a> &'a mut T: Encode {
93+
unsafe impl<T> Encode for *mut T where for<'b> &'b mut T: Encode {
9494
const ENCODING: Encoding<'static> = <&mut T>::ENCODING;
9595
}
9696

97-
unsafe impl<'a, T: 'a> Encode for Option<&'a T> where &'a T: Encode {
97+
unsafe impl<'a, T> Encode for Option<&'a T> where for<'b> &'b T: Encode {
9898
const ENCODING: Encoding<'static> = <&T>::ENCODING;
9999
}
100100

101-
unsafe impl<'a, T: 'a> Encode for Option<&'a mut T> where &'a mut T: Encode {
101+
unsafe impl<'a, T> Encode for Option<&'a mut T> where for<'b> &'b mut T: Encode {
102102
const ENCODING: Encoding<'static> = <&mut T>::ENCODING;
103103
}

0 commit comments

Comments
 (0)