diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-27 01:57:43 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-27 02:07:15 +1000 |
| commit | a35675d38f10cf19c9512d5d621338fc00530ad3 (patch) | |
| tree | c2232f3f367deb0cec2585762084284ecdfd6ad9 /compiler/rustc_ast/src | |
| parent | 283db70ace62a0ae704a624e43b68c2ee44b87a6 (diff) | |
| download | rust-a35675d38f10cf19c9512d5d621338fc00530ad3.tar.gz rust-a35675d38f10cf19c9512d5d621338fc00530ad3.zip | |
Remove `'static` bounds on `P`.
These date back to 2014. I don't think they're needed any more.
Diffstat (limited to 'compiler/rustc_ast/src')
| -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)) } |
