Closed
Description
fn main() {
std::task::spawn(move || panic!("A")); // OK
std::thread::Thread::spawn(move || panic!("B")).detach(); // Can't infer the return type
}
- http://is.gd/46Dv8w [playpen]
This makes the deprecation process of task::spawn()
non-trivial.
Thread::spawn::<(), FnOnce()+Send>(move || panic!("B")).detach();
did not work, either.