diff options
| author | Miguel Ojeda <ojeda@kernel.org> | 2023-12-29 22:26:23 +0100 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2023-12-29 22:26:23 +0100 |
| commit | dd928c8f75712bb25f140a3562463a613181e8c6 (patch) | |
| tree | 2ecafcd759acab6b1cfa6121ca2e16219bba953e /compiler/rustc_data_structures/src/lib.rs | |
| parent | fb5ed726f72c6d16c788517c60ec00d4564b9348 (diff) | |
| download | rust-dd928c8f75712bb25f140a3562463a613181e8c6.tar.gz rust-dd928c8f75712bb25f140a3562463a613181e8c6.zip | |
Primitive docs: fix confusing `Send` in `&T`'s list
The two lists in this document describe what traits are implemented on
references when their underlying `T` also implements them. However,
while it is true that `T: Send + Sync` implies `&T: Send` (which is
what the sentence is trying to explain), it is confusing to have `Send`
in the list because `T: Send` is not needed for that. In particular,
the "also require" part may be interpreted as "both `T: Send` and
`T: Sync` are required".
Instead, move `Send` back to where it was before commit 7a477869b72e
("Makes docs for references a little less confusing"), i.e. to the `&mut`
list (where no extra nota is needed, i.e. it fits naturally) and move the
`Sync` definition/note to the bottom as something independent.
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'compiler/rustc_data_structures/src/lib.rs')
0 files changed, 0 insertions, 0 deletions
