about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/thread/scoped.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/thread/scoped.rs b/library/std/src/thread/scoped.rs
index 8c64a6e6201..2bc93549dab 100644
--- a/library/std/src/thread/scoped.rs
+++ b/library/std/src/thread/scoped.rs
@@ -11,6 +11,8 @@ use crate::sync::Arc;
 /// See [`scope`] for details.
 pub struct Scope<'env> {
     data: ScopeData,
+    /// Invariance over 'env, to make sure 'env cannot shrink,
+    /// which is necessary for soundness.
     env: PhantomData<&'env mut &'env ()>,
 }