Skip to content

Commit aa9c088

Browse files
committed
Note the invariance over 'env in Scope<'env>.
1 parent 5bd5781 commit aa9c088

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/thread/scoped.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ use crate::sync::Arc;
1111
/// See [`scope`] for details.
1212
pub struct Scope<'env> {
1313
data: ScopeData,
14+
/// Invariance over 'env, to make sure 'env cannot shrink,
15+
/// which is necessary for soundness.
1416
env: PhantomData<&'env mut &'env ()>,
1517
}
1618

0 commit comments

Comments
 (0)