diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-01-05 12:13:33 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-01-05 12:14:32 +0100 |
| commit | aa9c0881efb116c20c9550ba26150a2060a276f0 (patch) | |
| tree | a6813ad7f6b0a758e748d12e358b6b48031fef7b /library/std/src | |
| parent | 5bd5781823629235c1a96950a4487263d52cee6a (diff) | |
| download | rust-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.rs | 2 |
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 ()>, } |
