From c5cb2def06c210a99a7299cfed67826b22452cf8 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Tue, 4 Jan 2022 16:57:16 +0100 Subject: [PATCH] Fix variance of thread::Scope. --- library/std/src/thread/scoped.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/thread/scoped.rs b/library/std/src/thread/scoped.rs index 0db938b9f39..cb5f48e5107 100644 --- a/library/std/src/thread/scoped.rs +++ b/library/std/src/thread/scoped.rs @@ -11,7 +11,7 @@ /// See [`scope`] for details. pub struct Scope<'env> { data: ScopeData, - env: PhantomData<&'env ()>, + env: PhantomData<&'env mut &'env ()>, } /// An owned permission to join on a scoped thread (block on its termination).