Remove unused lifetime parameter from spawn_unchecked · patricklam/verify-rust-std@67fa603 (original) (raw)

Original file line number Diff line number Diff line change
@@ -434,25 +434,24 @@ impl Builder {
434 434 ///
435 435 /// [`io::Result`]: crate::io::Result
436 436 #[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>>
438 438 where
439 439 F: FnOnce() -> T,
440 -F: Send + 'a,
441 -T: Send + 'a,
440 +F: Send,
441 +T: Send,
442 442 {
443 443 Ok(JoinHandle(unsafe { self.spawn_unchecked_(f, None) }?))
444 444 }
445 445
446 -unsafe fn spawn_unchecked_<'a, 'scope, F, T>(
446 +unsafe fn spawn_unchecked_<'scope, F, T>(
447 447 self,
448 448 f: F,
449 449 scope_data: Option<Arcscoped::ScopeData\>,
450 450 ) -> io::Result<JoinInner<'scope, T>>
451 451 where
452 452 F: FnOnce() -> T,
453 -F: Send + 'a,
454 -T: Send + 'a,
455 -'scope: 'a,
453 +F: Send,
454 +T: Send,
456 455 {
457 456 let Builder { name, stack_size } = self;
458 457
@@ -532,7 +531,7 @@ impl Builder {
532 531 // will call `decrement_num_running_threads` and therefore signal that this thread is
533 532 // done.
534 533 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
536 535 // after that before returning itself.
537 536 };
538 537