about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-01-05 12:13:33 +0100
committerMara Bos <m-ou.se@m-ou.se>2022-01-05 12:14:32 +0100
commitaa9c0881efb116c20c9550ba26150a2060a276f0 (patch)
treea6813ad7f6b0a758e748d12e358b6b48031fef7b /library/std/src
parent5bd5781823629235c1a96950a4487263d52cee6a (diff)
downloadrust-aa9c0881efb116c20c9550ba26150a2060a276f0.tar.gz
rust-aa9c0881efb116c20c9550ba26150a2060a276f0.zip
Note the invariance over 'env in Scope<'env>.
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 ()>,
 }