diff options
Diffstat (limited to 'compiler/rustc_ast/src/ptr.rs')
| -rw-r--r-- | compiler/rustc_ast/src/ptr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ast/src/ptr.rs b/compiler/rustc_ast/src/ptr.rs index dd923305cdf..1e6a5e91f23 100644 --- a/compiler/rustc_ast/src/ptr.rs +++ b/compiler/rustc_ast/src/ptr.rs @@ -32,11 +32,11 @@ pub struct P<T: ?Sized> { /// Construct a `P<T>` from a `T` value. #[allow(non_snake_case)] -pub fn P<T: 'static>(value: T) -> P<T> { +pub fn P<T>(value: T) -> P<T> { P { ptr: Box::new(value) } } -impl<T: 'static> P<T> { +impl<T> P<T> { /// Move out of the pointer. /// Intended for chaining transformations not covered by `map`. pub fn and_then<U, F>(self, f: F) -> U @@ -86,7 +86,7 @@ impl<T: ?Sized> DerefMut for P<T> { } } -impl<T: 'static + Clone> Clone for P<T> { +impl<T: Clone> Clone for P<T> { fn clone(&self) -> P<T> { P((**self).clone()) } @@ -110,7 +110,7 @@ impl<T> fmt::Pointer for P<T> { } } -impl<D: Decoder, T: 'static + Decodable<D>> Decodable<D> for P<T> { +impl<D: Decoder, T: Decodable<D>> Decodable<D> for P<T> { fn decode(d: &mut D) -> P<T> { P(Decodable::decode(d)) } |
