diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-10-09 11:56:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-09 11:56:01 +0200 |
| commit | 346f833c3ddc724184f5b3efc7a5008aa27ef484 (patch) | |
| tree | a6a3a2e51c8da1b65db3ef4831520bc859b15f8a /library/std/src | |
| parent | 5ebb6a8fd93eb559eb8e00a7947fbc4ad7e63580 (diff) | |
| parent | 82c974dab5cd69862528724a36a954d9699b3d98 (diff) | |
| download | rust-346f833c3ddc724184f5b3efc7a5008aa27ef484.tar.gz rust-346f833c3ddc724184f5b3efc7a5008aa27ef484.zip | |
Rollup merge of #89678 - marcelo-gonzalez:master, r=joshtriplett
Fix minor std::thread documentation typo callers of spawn_unchecked() need to make sure that the thread not outlive references in the passed closure, not the other way around.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/thread/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 707a55b6258..7d404aff30e 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -412,9 +412,9 @@ impl Builder { /// /// # Safety /// - /// The caller has to ensure that no references in the supplied thread closure - /// or its return type can outlive the spawned thread's lifetime. This can be - /// guaranteed in two ways: + /// The caller has to ensure that the spawned thread does not outlive any + /// references in the supplied thread closure and its return type. + /// This can be guaranteed in two ways: /// /// - ensure that [`join`][`JoinHandle::join`] is called before any referenced /// data is dropped |
