rust/library/alloc/src
Matthias Krüger 1cc0ae4cbb
Rollup merge of #89869 - kpreid:from-doc, r=yaahc
Add documentation to more `From::from` implementations.

For users looking at documentation through IDE popups, this gives them relevant information rather than the generic trait documentation wording “Performs the conversion”. For users reading the documentation for a specific type for any reason, this informs them when the conversion may allocate or copy significant memory versus when it is always a move or cheap copy.

Notes on specific cases:
* The new documentation for `From<T> for T` explains that it is not a conversion at all.
* Also documented `impl<T, U> Into<U> for T where U: From<T>`, the other central blanket implementation of conversion.
* The new documentation for construction of maps and sets from arrays of keys mentions the handling of duplicates. Future work could be to do this for *all* code paths that convert an iterable to a map or set.
* I did not add documentation to conversions of a specific error type to a more general error type.
* I did not add documentation to unstable code.

This change was prepared by searching for the text "From<... for" and so may have missed some cases that for whatever reason did not match. I also looked for `Into` impls but did not find any worth documenting by the above criteria.
2022-02-17 06:29:57 +01:00
..
alloc Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
collections Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00
raw_vec Add a unit test for zero-sized types in RawVec. 2021-11-26 19:30:45 +11:00
rc Re-stabilize Weak::as_ptr &friends for unsized T 2021-01-06 19:30:22 -05:00
sync Rollup merge of #80764 - CAD97:weak-unsized-as-ptr-again, r=RalfJung 2021-01-16 17:29:56 +00:00
vec Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00
alloc.rs Mark __rgl_oom and __rd_oom as "C-unwind" 2022-02-05 20:58:04 +00:00
borrow.rs docs: fix typo 2021-12-18 11:21:58 +01:00
boxed.rs Add tracking issues (const_box, const_alloc_error) 2022-01-04 00:35:53 +09:00
fmt.rs Fix typo in std::fmt docs 2022-02-09 11:26:10 +01:00
lib.rs Stabilise inherent_ascii_escape (FCP in #77174) 2022-02-12 13:21:59 -05:00
macros.rs Add diagnostic items for macros 2022-01-06 14:59:33 +00:00
raw_vec.rs Improve estimation of capacity in Vec::from_iter 2022-01-19 09:47:49 -05:00
rc.rs Add tracking issue and impl for Rc. 2022-02-03 10:40:31 +00:00
slice.rs Stabilise inherent_ascii_escape (FCP in #77174) 2022-02-12 13:21:59 -05:00
str.rs Use spare_capacity_mut instead of invalid unchecked indexing 2021-12-08 17:58:57 -05:00
string.rs Fix a minor mistake in String::try_reserve_exact examples 2021-12-29 13:22:35 +08:00
sync.rs Add tracking issue and impl for Rc. 2022-02-03 10:40:31 +00:00
task.rs Document From implementations for Waker and RawWaker 2021-04-22 14:16:33 -07:00
tests.rs Fix alloc::test::test_show 2021-04-21 15:45:41 +02:00