Skip to content

Commit 67fa603

Browse files
committed
Remove unused lifetime parameter from spawn_unchecked
1 parent 9cc3bc6 commit 67fa603

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

std/src/thread/mod.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -434,25 +434,24 @@ impl Builder {
434434
///
435435
/// [`io::Result`]: crate::io::Result
436436
#[unstable(feature = "thread_spawn_unchecked", issue = "55132")]
437-
pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result<JoinHandle<T>>
437+
pub unsafe fn spawn_unchecked<F, T>(self, f: F) -> io::Result<JoinHandle<T>>
438438
where
439439
F: FnOnce() -> T,
440-
F: Send + 'a,
441-
T: Send + 'a,
440+
F: Send,
441+
T: Send,
442442
{
443443
Ok(JoinHandle(unsafe { self.spawn_unchecked_(f, None) }?))
444444
}
445445

446-
unsafe fn spawn_unchecked_<'a, 'scope, F, T>(
446+
unsafe fn spawn_unchecked_<'scope, F, T>(
447447
self,
448448
f: F,
449449
scope_data: Option<Arc<scoped::ScopeData>>,
450450
) -> io::Result<JoinInner<'scope, T>>
451451
where
452452
F: FnOnce() -> T,
453-
F: Send + 'a,
454-
T: Send + 'a,
455-
'scope: 'a,
453+
F: Send,
454+
T: Send,
456455
{
457456
let Builder { name, stack_size } = self;
458457

@@ -532,7 +531,7 @@ impl Builder {
532531
// will call `decrement_num_running_threads` and therefore signal that this thread is
533532
// done.
534533
drop(their_packet);
535-
// Here, the lifetime `'a` and even `'scope` can end. `main` keeps running for a bit
534+
// Here, the lifetime `'scope` can end. `main` keeps running for a bit
536535
// after that before returning itself.
537536
};
538537

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy