Why rustc has a problem with thread using parent's data despite join?

That's a use-case for thread::scope, which does the same thing your program is doing, but has the type signatures that allow you to capture non-'static data.

2 Likes