Skip to content

Commit 1e8ec2d

Browse files
committed
Add an explanatory comment to scoped_thread.
1 parent 0a7d297 commit 1e8ec2d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_interface/util.rs

+2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ impl Write for Sink {
102102
}
103103
}
104104

105+
/// Like a `thread::Builder::spawn` followed by a `join()`, but avoids the need
106+
/// for `'static` bounds.
105107
#[cfg(not(parallel_compiler))]
106108
pub fn scoped_thread<F: FnOnce() -> R + Send, R: Send>(cfg: thread::Builder, f: F) -> R {
107109
struct Ptr(*mut ());

0 commit comments

Comments
 (0)