Commit graph

543 commits

Author SHA1 Message Date
Joshua Nelson
6f4681bacc Convert str -> prim@str in std 2020-08-23 22:40:20 -04:00
Joshua Nelson
373432e47f Convert from str -> prim@str for alloc 2020-08-23 22:40:20 -04:00
Joshua Nelson
556fd86524 Disambiguate char -> prim@char for core
This also changes human intuition -> intuition. 'human intuition' sounds
vaguely menacing.
2020-08-23 22:40:20 -04:00
bors
a962b692a6 Auto merge of #75817 - LeSeulArtichaut:proc_macro-docs, r=jyn514
Use intra-doc link in `proc_macro`

Yep. One link.

Helps with #75080.
r? @jyn514
2020-08-24 02:18:09 +00:00
Dylan DPC
c26a8d5772
add issue number 2020-08-24 02:34:52 +02:00
JR Heard
bc47f70f88
doc: Fix typo in std::process::Child documentation 2020-08-23 16:38:23 -07:00
Joshua Nelson
602dd145a3 Use allow(unused_imports) instead of cfg(doc)
This prevents links from breaking when items are re-exported in a
different crate and the original isn't being documented.
2020-08-23 18:45:57 -04:00
LeSeulArtichaut
d36e3e23a8 Use intra-doc-links in core::{char, macros, fmt} 2020-08-24 00:13:23 +02:00
Camelid
04e8237c6d
Switch to intra-doc links in core::array 2020-08-23 14:42:21 -07:00
Camelid
e9928d8926
Switch to intra-doc links in std::collections 2020-08-23 13:51:01 -07:00
bors
0ec94594dd Auto merge of #72449 - ecstatic-morse:const-float-bitcast, r=RalfJung
Const floating point bitcasts and classification

Makes the `f32` and `f64` methods described in #72447 and #72505 unstably const.

r? @RalfJung
2020-08-23 19:14:55 +00:00
bors
d02a209eb9 Auto merge of #75028 - MrModder:master, r=steveklabnik
Document that slice refers to any pointer type to a sequence

I was recently confused about the way slices are represented in memory. The necessary information was not available in the std-docs directly, but was a mix of different material from the reference and book.

This PR should clear up the definition of slices a bit more in the documentation. Especially the fact that the term slice refers to the pointer/reference type, e.g. `&[T]`, and not `[T]`.
It also documents that slice pointers are twice the size of pointers to `Sized` types, as this concept may be unfamiliar to users coming from other languages that do not have the concept of "fat pointers" (especially C/C++).

I've documented why this was important to me and my findings in [this blog post](https://codecrash.me/understanding-rust-slices).

r? @lcnr
2020-08-23 16:59:10 +00:00
bors
9d606d939a Auto merge of #74238 - RalfJung:offset_from, r=oli-obk
stabilize ptr_offset_from

This stabilizes ptr::offset_from, and closes https://github.com/rust-lang/rust/issues/41079. It also removes the deprecated `wrapping_offset_from`. This function was deprecated 19 days ago and was never stable; given an FCP of 10 days and some waiting time until FCP starts, that leaves at least a month between deprecation and removal which I think is fine for a nightly-only API.

Regarding the open questions in https://github.com/rust-lang/rust/issues/41079:
* Should offset_from abort instead of panic on ZSTs? -- As far as I know, there is no precedent for such aborts. We could, however, declare this UB. Given that the size is always known statically and the check thus rather cheap, UB seems excessive.
* Should there be more methods like this with different restrictions (to allow nuw/nsw, perhaps) or that return usize (like how isize-taking offset is more conveniently done with usize-taking add these days)? -- No reason to block stabilization on that, we can always add such methods later.

Also nominating the lang team because this exposes an intrinsic.

The stabilized method is best described [by its doc-comment](56d4b2d69a/src/libcore/ptr/const_ptr.rs (L227)). The documentation forgot to mention the requirement that both pointers must "have the same provenance", aka "be derived from pointers to the same allocation", which I am adding in this PR. This is a precondition that [Miri already implements](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a3b9d0a07a01321f5202cd99e9613480) and that, should LLVM ever obtain a `psub` operation to subtract pointers, will likely be required for that operation (following the semantics in [this paper](https://people.mpi-sws.org/~jung/twinsem/twinsem.pdf)).
2020-08-23 14:50:15 +00:00
Ralf Jung
4129e0757a bump stable version
Co-authored-by: Josh Stone <cuviper@gmail.com>
2020-08-23 16:12:39 +02:00
Ralf Jung
eb27828bf1 remove an unused feature flag 2020-08-23 16:12:39 +02:00
Leon Matthes
cf76256b83 Revert changed paragraph about slice definition.
This reverts part of commit e6c83dd57b.
As requested by @steveklabnik .
2020-08-23 16:02:22 +02:00
Mateusz Mikuła
1a9def139e Profiler: reenable atomics after #65214 2020-08-23 15:55:18 +02:00
bors
b88434ee0f Auto merge of #75816 - LeSeulArtichaut:core-intra-docs, r=jyn514
Use intra-doc-links in `core::{raw, ffi, pin}`

Helps with #75080.
r? @jyn514
2020-08-23 12:40:01 +00:00
Ayush Kumar Mishra
18f47d81da Misleading documentation for derived Ord/PartialOrd implementation for enums #75620 2020-08-23 15:56:01 +05:30
Lzu Tao
2c995d29f7 Prefer https link for wikipedia URLs 2020-08-23 10:02:42 +00:00
JR Heard
69d3334adf
Fix typo in documentation of i32 wrapping_abs() 2020-08-22 22:21:03 -07:00
Camelid
637659be6a Add missing links 2020-08-22 20:23:50 -07:00
Camelid
becf5ec4ea Add missing intra-doc link 2020-08-22 17:41:40 -07:00
Camelid
5d32786b4f Switch to intra-doc links in std::macros
Also:
* Fix typo in module docs
* Link to `std::io::stderr` instead of `std::io::Stderr` to match the
  link text
* Link to `std::io::stdout`
2020-08-22 15:44:00 -07:00
Oliver Middleton
57e7e2875b Update docs for SystemTime Windows implementation
Windows now uses `GetSystemTimePreciseAsFileTime` on versions of Windows that support it.
2020-08-22 22:00:33 +01:00
LeSeulArtichaut
c3e3b7f119 Use intra-doc link in proc_macro 2020-08-22 22:29:43 +02:00
LeSeulArtichaut
c8a372ecff Use intra-doc-links in core::{raw, ffi, pin} 2020-08-22 22:25:27 +02:00
Dylan MacKenzie
23e08e223b Add #![feature(const_float_classify)] for f64::classify and friends 2020-08-22 12:28:31 -07:00
Dylan MacKenzie
3cd450ec5d Add #![feature(const_float_bits_conv)] for f64::to_bits and friends 2020-08-22 12:28:31 -07:00
bors
663d2f5cd3 Auto merge of #75171 - amosonn:new_zeroed_slice, r=Amanieu
New zeroed slice

Add to #63291 the methods

```rust
impl<T> Box<[T]> { pub fn new_zeroed_slice(len: usize) -> Box<[MaybeUninit<T>]> {…} }
impl<T> Rc<[T]> { pub fn new_zeroed_slice(len: usize) -> Rc<[MaybeUninit<T>]> {…} }
impl<T> Arc<[T]> { pub fn new_zeroed_slice(len: usize) -> Arc<[MaybeUninit<T>]> {…} }
```

as suggested in https://github.com/rust-lang/rust/issues/63291#issuecomment-605511675 .

Also optimize `{Rc, Arc}::new_zeroed` to use `alloc_zeroed`, otherwise they are no more efficient than using `new_uninit` and zeroing the memory manually (which was the original implementation).
2020-08-22 18:46:42 +00:00
bors
527a685e40 Auto merge of #75783 - denisvasilik:intra-doc-links-core-alloc, r=jyn514
Move to intra-doc links for library/core/src/alloc/{layout, global, mod}.rs

Helps with #75080. The files already contained intra-doc links, so there are only minor changes.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

Known issues:

* [`handle_alloc_error`]: Link from `core` to `alloc` could not be resolved.
* [`slice`]: slice is a primitive type, but could not be resolved; had to use [`crate::slice`] instead.
2020-08-22 13:21:24 +00:00
Ralf Jung
9a12d9a243 fix dead links to wrapping_offset_from 2020-08-22 15:07:34 +02:00
Ralf Jung
4f92f0d31b remove feature gate from tests 2020-08-22 15:07:32 +02:00
Ralf Jung
0e4f335e63 stabilize ptr_offset_from 2020-08-22 14:37:10 +02:00
Ralf Jung
7ad4369ba6 remove deprecated wrapping_offset_from 2020-08-22 14:37:08 +02:00
Ralf Jung
1241f1927e offset_from: also document same-provenance requirement 2020-08-22 14:37:06 +02:00
Denis Vasilik
2500b6df14 Link to primitive instead of module 2020-08-22 12:16:03 +02:00
bors
c5a8b7b901 Auto merge of #75790 - LeSeulArtichaut:std-intra-doc, r=jyn514
Use intra-doc-links in `std::sync::*`

Helps with #75080.
r? @jyn514
2020-08-22 08:54:29 +00:00
bors
ebc03f7c80 Auto merge of #75772 - tmiasko:io-maybe-no, r=dtolnay
Remove unused `Maybe` wrapper around raw standard streams

* Remove result type from raw standard streams constructors
* Make raw standard stream constructors const
* Remove wrapper type handling absent raw standard streams

cargo checked with:

```shell
env CC=true ./x.py check library/std/ \
  --target i686-unknown-linux-gnu \
  --target wasm32-unknown-emscripten \
  --target wasm32-wasi \
  --target x86_64-fortanix-unknown-sgx \
  --target x86_64-pc-windows-gnu \
  --target x86_64-unknown-cloudabi \
  --target x86_64-unknown-hermit \
  --target x86_64-unknown-linux-gnu \
  --target x86_64-uwp-windows-gnu \
  --target x86_64-wrs-vxworks
```

Note: Last target doesn't compile currently.
2020-08-22 04:39:15 +00:00
Dylan DPC
13dfa9c874
Rollup merge of #75787 - LeSeulArtichaut:core-intra-doc, r=jyn514
Use intra-doc-links in `core::ops::*`

Helps with #75080.
r? @jyn514
2020-08-22 02:14:57 +02:00
Dylan DPC
2ea63794a4
Rollup merge of #75782 - GuillaumeGomez:more-links, r=jyn514
Convert core/src/str/pattern.rs to Intra-doc links

Part of #75080.
2020-08-22 02:14:56 +02:00
Dylan DPC
ec629800ec
Rollup merge of #75725 - LeSeulArtichaut:alloc-intra-doc, r=jyn514
Use intra-doc-links in `alloc`

I didn't have time to test this, so I will let the CI do it for me.

r? @jyn514 cc #75080
2020-08-22 02:14:45 +02:00
Dylan DPC
8af33add1a
Rollup merge of #75705 - denisvasilik:intra-doc-links-intrinsics, r=jyn514
Move to intra-doc links for /library/core/src/intrinsics.rs

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

Known issues:

* The following f32 and f64 primitive methods cannot be resolved:

    f32/f64::powi
    f32/f64::sqrt
    f32/f64::sin
    f32/f64::cos
    f32/f64::powf
    f32/f64::exp
    f32/f64::exp2
    f32/f64::ln
    f32/f64::log2
    f32/f64::log10
    f32/f64::mul_add
    f32/f64::abs
    f32/f64::copysign
    f32/f64::floor
    f32/f64::ceil
    f32/f64::trunc
    f32/f64::round

* Links from core to std:

    [`std::pointer::*`]
    [`std::process::abort`]
    [`from_raw_parts`]
    [`Vec::append`]

* Links with anchors?

	I provided a separate commit that replaced links with anchors by intra-doc links.
	Here the anchor location information gets lost, so its questionable whether to
	actually replace those links.
2020-08-22 02:14:36 +02:00
LeSeulArtichaut
f3a832f4b4 Use intra-doc-links in std::sync::* 2020-08-22 01:28:26 +02:00
Guillaume Gomez
385a1b2476 Add more links 2020-08-22 00:10:58 +02:00
LeSeulArtichaut
9424ac79b2 Remove links that get imported from the prelude 2020-08-21 23:27:23 +02:00
LeSeulArtichaut
8e009bc4f0 Use intra-doc-links in core::ops::* 2020-08-21 23:19:10 +02:00
amosonn
5aba816672
Update rc.rs 2020-08-21 22:25:09 +02:00
Denis Vasilik
9785fd0882 Use intra-doc links 2020-08-21 21:41:43 +02:00
Denis Vasilik
a45d90ec23 Use intra-doc links 2020-08-21 21:35:52 +02:00
Guillaume Gomez
a3b45f3e54 Convert links to intra-doc links format 2020-08-21 20:28:57 +02:00
LeSeulArtichaut
97072c6b90 Apply suggestions from code review
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-21 19:31:00 +02:00
Denis Vasilik
37b6c249ed Rework imports used solely for docs 2020-08-21 19:19:58 +02:00
Denis Vasilik
0f6d95d1eb Apply auto-formatter 2020-08-21 18:50:09 +02:00
Denis Vasilik
0bccd9809e Incorporate suggestions from review 2020-08-21 18:35:17 +02:00
bors
efec7cde93 Auto merge of #75694 - RalfJung:miri-align-to, r=nagisa
enable align_to tests in Miri

With https://github.com/rust-lang/miri/issues/1074 resolved, we can enable these tests in Miri.

I also tweaked the test sized to get reasonable execution times with decent test coverage.
2020-08-21 15:40:48 +00:00
Tomasz Miąsko
78e094632e Remove wrapper type handling absent raw standard streams
Raw standard streams are always available.  Remove unused wrapper type
that was supposed to be responsible for handling their absence.
2020-08-21 13:17:20 +02:00
Tomasz Miąsko
4a00421ba4 Make raw standard stream constructors const 2020-08-21 13:17:20 +02:00
Tomasz Miąsko
479c23bb49 Remove result type from raw standard streams constructors
Raw standard streams constructors are infallible. Remove unnecessary
result type.
2020-08-21 13:17:20 +02:00
Yuki Okushi
2a7f868d7f
Rollup merge of #75750 - poliorcetics:intra-links-std-thread, r=jyn514
Move to intra doc links for std::thread documentation

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514
2020-08-21 17:55:15 +09:00
Yuki Okushi
cccb8892e9
Rollup merge of #75727 - camelid:intra-doc-links-for-core-result, r=jyn514
Switch to intra-doc links in `core::result`

Part of #75080.

@rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
2020-08-21 17:55:14 +09:00
Yuki Okushi
f2d25538d4
Rollup merge of #75324 - ericseppanen:master, r=JohnTitor
clarify documentation of remove_dir errors

remove_dir will error if the path doesn't exist or isn't a directory.

It's useful to clarify that this is "remove dir or fail" not "remove dir
if it exists".

I don't think this belongs in the title. "Removes an existing, empty
directory" is strangely worded-- there's no such thing as a non-existing
directory.  Better to just say explicitly it will return an error.
2020-08-21 17:55:08 +09:00
bors
d9d4d39612 Auto merge of #73565 - matthewjasper:core-min-spec, r=nagisa
Use min_specialization in libcore

Getting `TrustedRandomAccess` to work is the main interesting thing here.

- `get_unchecked` is now an unstable, hidden method on `Iterator`
- The contract for `TrustedRandomAccess` is made clearer in documentation
- Fixed a bug where `Debug` would create aliasing references when using the specialized zip impl
- Added tests for the side effects of `next_back` and `nth`.

closes #68536
2020-08-20 23:05:31 +00:00
LeSeulArtichaut
1ababd8794 Use intra-doc-links in alloc 2020-08-21 00:25:25 +02:00
Alexis Bourget
fb3f927131 Move to intra doc links for std::thread documentation 2020-08-20 22:03:00 +02:00
Camelid
5a307cf4bb
Fix intra-doc links
One of the original links was linking to the wrong thing as well.

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-08-20 12:39:12 -07:00
Josh Stone
6ac1523b23
Rollup merge of #75733 - pickfire:patch-3, r=matklad
Remove duplicated alloc vec bench push_all_move

push_all_move is the same as extend
2020-08-20 10:07:32 -07:00
Josh Stone
7ac126ec56
Rollup merge of #75703 - tmiasko:stack-overflow-musl, r=cuviper
Enable stack-overflow detection on musl for non-main threads
2020-08-20 10:07:24 -07:00
Josh Stone
f29f21285e
Rollup merge of #75672 - kofls:intradoc-fix, r=jyn514
Move to intra-doc links for task.rs and vec.rs

Partial fix for #75080

links for [`get`], [`get_mut`] skipped due to #75643
link for [`copy_from_slice`] skipped due to #63351
2020-08-20 10:07:19 -07:00
Ivan Tham
4f2e182c5f
Liballoc bench rename push_all extend_from_slice 2020-08-20 19:04:52 +08:00
Tim Diekmann
46b547cb58 Assume same alignment in RawVec 2020-08-20 11:56:46 +02:00
Ivan Tham
2932d4e634
Remove duplicated alloc vec bench push_all_move
push_all_move is the same as extend
2020-08-20 15:20:46 +08:00
Camelid
22c02bfdb1
Revert to old link since intra-doc link is broken
Can't link from `core` to `std` yet.
2020-08-19 18:17:55 -07:00
Tim Diekmann
303ee3fd83
Add debug assertion for equal alignment in RawVec 2020-08-20 01:01:46 +02:00
bors
5f6fcad644 Auto merge of #75563 - richkadel:llvm-coverage-map-gen-5.4, r=wesleywiser
Moved coverage counter injection from BasicBlock to Statement.

As discussed on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implement.20LLVM-compatible.20source-based.20cod.20compiler-team.23278
2020-08-19 22:48:40 +00:00
Camelid
e0430a8aa2 Switch to intra-doc links in core::result 2020-08-19 14:02:34 -07:00
Matthew Jasper
dbad8c9368 Use min_specialization in libcore 2020-08-19 20:08:02 +01:00
Tyler Mandry
ad3db41182
Rollup merge of #75696 - matklad:mirit, r=RalfJung
Remove `#[cfg(miri)]` from OnceCell tests

They were carried over from once_cell crate, but they are not entirely
correct (as miri now supports more things), and we don't run miri
tests for std, so let's just remove them.

Maybe one day we'll run miri in std, but then we can just re-install
these attributes.
2020-08-19 11:12:25 -07:00
Tyler Mandry
0fdc8c06dd
Rollup merge of #75674 - poliorcetics:intra-links-std-io, r=jyn514
Move to intra doc links for std::io

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514

I had no problems with those files so I added some small links here and there.
2020-08-19 11:12:23 -07:00
Tyler Mandry
4123237fa1
Rollup merge of #75648 - matklad:lazy-dropck, r=KodrAus
Make OnceCell<T> transparent to dropck

See the failed build in

https://github.com/rust-lang/rust/pull/75555#issuecomment-675016718

for an example where we need this in real life

r? @ghost
2020-08-19 11:12:20 -07:00
bors
443e177c7f Auto merge of #75480 - ssomers:btree_check_invariant, r=Mark-Simulacrum
BTreeMap: check some invariants in unit tests
2020-08-19 15:27:40 +00:00
Denis Vasilik
f71919c3db Fix anchor links 2020-08-19 16:44:20 +02:00
Alexis Bourget
dad8e11e9f Fix nits in intra-doc links for std io 2020-08-19 16:26:17 +02:00
Denis Vasilik
6e2f076917 Use intra-doc links for links with anchors 2020-08-19 15:22:04 +02:00
Denis Vasilik
d1838f6c73 Use intra-doc links for compare_exchange and compare_exchange_weak 2020-08-19 15:12:28 +02:00
Denis Vasilik
751e343ab2 Use intra-doc linkks 2020-08-19 14:13:53 +02:00
Denis Vasilik
d339cfe4a1 Use intra-doc links for ptr::* 2020-08-19 13:38:22 +02:00
bors
11a44adc6f Auto merge of #75600 - nagisa:improve_align_offset, r=KodrAus
Improve codegen for `align_offset`

In this PR the `align_offset` implementation is changed/improved to produce better code in certain scenarios such as when pointer type is has a stride of 1 or when building for low optimisation levels.

While these changes do not achieve the "ideal" codegen referenced in #75579, it gets significantly closer to it. I’m not actually sure if the codegen can actually be much better with this function returning the offset, rather than the aligned pointer.

See the descriptions for separate commits for further information.
2020-08-19 10:54:44 +00:00
Denis Vasilik
2c7998720c Use intra-doc links for mem::* 2020-08-19 12:38:32 +02:00
Denis Vasilik
45b4e1470c Use intra-doc links for sync::* 2020-08-19 12:16:16 +02:00
Denis Vasilik
fb7d9170f4 Use intra-doc links for f32::* and f64::* 2020-08-19 12:04:23 +02:00
Ralf Jung
6a06bfc252 enable align_to tests in Miri 2020-08-19 10:41:51 +02:00
Aleksey Kladov
34e7eac1ca Remove #[cfg(miri)] from OnceCell tests
They were carried over from once_cell crate, but they are not entirely
correct (as miri now supports more things), and we don't run miri
tests for std, so let's just remove them.

Maybe one day we'll run miri in std, but then we can just re-install
these attributes.
2020-08-19 10:28:22 +02:00
Denis Vasilik
a929738478 Use intra-doc links for u32::* 2020-08-19 10:19:06 +02:00
Denis Vasilik
7b5ec9e9e0 Use intra-doc links for AtomicU32::* 2020-08-19 09:58:41 +02:00
Denis Vasilik
2373dbce83 Use intra-doc links for AtomicI32::* 2020-08-19 09:52:19 +02:00
Yuki Okushi
07ea340e89
Rollup merge of #75685 - nixphix:docs/unix-ext, r=jyn514
Switch to intra-doc links in /src/sys/unix/ext/*.rs

Partial fix for #75080

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514

These two links are not resolving to either `crate::fs::File...` or `fs::File...`
```
# unix/ext/fs.rs
   27:    /// [`File::read`]: ../../../../std/fs/struct.File.html#method.read

  130:   /// [`File::write`]: ../../../../std/fs/struct.File.html#method.write
```
2020-08-19 15:54:39 +09:00
Yuki Okushi
9cf390357b
Rollup merge of #75646 - poliorcetics:intra-links-keywords, r=jyn514
Move to intra doc links for keyword documentation

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
2020-08-19 15:54:32 +09:00
Yuki Okushi
ac264b53d1
Rollup merge of #75499 - jack-champagne:jack-champagne/issue-75412, r=Dylan-DPC
Fix documentation error

This should fix #75412. Just a quick >= to > sign replacement.
2020-08-19 15:54:28 +09:00
Yuki Okushi
1f4f31785e
Rollup merge of #75049 - janriemer:patch-1, r=poliorcetics
docs(marker/copy): provide example for `&T` being `Copy`

### Edited 2020-08-16 (most recent)
In the current documentation about the `Copy` marker trait, there is a section
with examples of structs that can implement `Copy`. Currently there is no example for
showing that shared references (`&T`) are also `Copy`.
It is worth to have a dedicated example for `&T` being `Copy`, because shared
references are an integral part of the language and it being `Copy` is not as
intuitive as other types that share this behaviour like `i32` or `bool`.

The example picks up on the previous non-`Copy` struct and shows that
structs can be `Copy`, even when they hold a shared reference to a non-`Copy` type.

-----------------------------------------
### Edited 2020-08-02, 3:28 p.m.
I've just realized that it says "in addition to the **implementors listed below**", which makes this PR kind of "wrong", because `&T` is indeed in the "implementors listed below".
Maybe we can instead show an example with `&T` in the [When can my type be Copy](https://doc.rust-lang.org/std/marker/trait.Copy.html#when-can-my-type-be-copy) section.

What I really want to achieve is that it becomes more obvious that `&T` is also `Copy`, because, I think, it is very valuable to know and it wasn't obvious for me, until I read something about it in a forum post.

What do you think? I would create another PR for that.
**Please feel free to close this PR.**

-----------------------------------
### Original post
In the current documentation about the `Copy` marker trait, there is a section
about "additional implementors", which list additional implementors of the `Copy` trait.
The fact that shared references are also `Copy` is mixed with another point,
which makes it hard to recognize and make it seem not as important.

This clarifies the fact that shared references are also `Copy`, by mentioning it as a
separate item in the list of "additional implementors".
2020-08-19 15:54:26 +09:00