From a35675d38f10cf19c9512d5d621338fc00530ad3 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 27 May 2025 01:57:43 +1000 Subject: Remove `'static` bounds on `P`. These date back to 2014. I don't think they're needed any more. --- compiler/rustc_ast/src/ptr.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_ast/src') 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 { /// Construct a `P` from a `T` value. #[allow(non_snake_case)] -pub fn P(value: T) -> P { +pub fn P(value: T) -> P { P { ptr: Box::new(value) } } -impl P { +impl P { /// Move out of the pointer. /// Intended for chaining transformations not covered by `map`. pub fn and_then(self, f: F) -> U @@ -86,7 +86,7 @@ impl DerefMut for P { } } -impl Clone for P { +impl Clone for P { fn clone(&self) -> P { P((**self).clone()) } @@ -110,7 +110,7 @@ impl fmt::Pointer for P { } } -impl> Decodable for P { +impl> Decodable for P { fn decode(d: &mut D) -> P { P(Decodable::decode(d)) } -- cgit 1.4.1-3-g733a5