From 7206fe30302937075c51c16a69d1eb3bbce6a671 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 2 Feb 2024 10:53:12 -0500 Subject: [PATCH] fix(rt): `Sleep::downcast_mut_pin()` no longer extend lifetime This lifetime extension was a mistake. Closes #3556 BREAKING CHANGE: The returned lifetime from `Sleep::downcast_mut_pin()` is no longer `'static`. This shouldn't affect most usage. This sort of breaking change is needed because it is _wrong_. --- src/rt/timer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rt/timer.rs b/src/rt/timer.rs index 1e15694726..c486ecc14a 100644 --- a/src/rt/timer.rs +++ b/src/rt/timer.rs @@ -104,7 +104,7 @@ impl dyn Sleep { } /// Downcast a pinned &mut Sleep object to its original type - pub fn downcast_mut_pin(self: Pin<&mut Self>) -> Option> + pub fn downcast_mut_pin(self: Pin<&mut Self>) -> Option> where T: Sleep + 'static, {