rust/library/std/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
..
backtrace Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
collections add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error silence tidy errors 2022-01-07 13:59:27 -08:00
f32 Implement IEEE 754-2019 minimun and maximum functions for f32/f64 2021-11-20 10:14:03 +01:00
f64 Remove fNN::lerp - consensus unlikely 2021-10-25 22:44:41 -05:00
ffi Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00
fs fs: Add a regression test for #93384 2022-01-29 16:37:21 -05:00
io Rename to InvalidFilename 2022-02-10 23:49:27 +09:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
net Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Implement AsFd for &T and &mut T. 2022-02-10 18:26:12 -08:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path Auto merge of #91673 - ChrisDenton:path-absolute, r=Mark-Simulacrum 2022-02-13 12:03:52 +00:00
prelude update cfg(bootstrap)s 2022-01-28 15:01:07 +01:00
process Rollup merge of #92208 - ChrisDenton:win-bat-cmd, r=dtolnay 2021-12-23 00:28:56 +01:00
sync update cfg(bootstrap)s 2022-01-28 15:01:07 +01:00
sys Maintain broken symlink behaviour for the Windows exe resolver 2022-02-14 12:50:18 +00:00
sys_common Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
thread Rollup merge of #92555 - m-ou-se:scoped-threads, r=Amanieu 2022-01-23 20:13:02 +01:00
time make Instant::{duration_since, elapsed, sub} saturating and remove workarounds 2022-02-13 01:04:55 +01:00
alloc.rs Rename rterr to rtprintpanic 2021-05-19 15:52:09 +02:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs Change Backtrace::enabled atomic from SeqCst to Relaxed 2021-12-20 12:34:10 -08:00
env.rs Add missing platform-specific information on current_dir and set_current_dir 2022-02-11 16:33:02 +01:00
error.rs Improve Duration::try_from_secs_f32/64 accuracy by directly processing exponent and mantissa 2022-01-26 18:14:25 +03:00
f32.rs Remove fNN::lerp - consensus unlikely 2021-10-25 22:44:41 -05:00
f64.rs Remove fNN::lerp - consensus unlikely 2021-10-25 22:44:41 -05:00
fs.rs Rollup merge of #93206 - ChrisDenton:ntopenfile, r=nagisa 2022-02-08 16:40:49 +01:00
keyword_docs.rs eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
lazy.rs Add #[must_use] to core and std constructors 2021-10-10 02:44:26 -04:00
lib.rs Auto merge of #91673 - ChrisDenton:path-absolute, r=Mark-Simulacrum 2022-02-13 12:03:52 +00:00
macros.rs Add diagnostic items for macros 2022-01-06 14:59:33 +00:00
num.rs Add Saturating type (based on Wrapping type) 2021-08-10 19:27:01 +02:00
panic.rs Configure panic hook backtrace behavior 2022-02-02 13:46:42 -05:00
panicking.rs Configure panic hook backtrace behavior 2022-02-02 13:46:42 -05:00
path.rs Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00
primitive_docs.rs Fix annotation of code blocks 2022-02-01 21:44:53 +00:00
process.rs Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00
rt.rs Change Termination::report return type to ExitCode 2022-01-28 12:53:36 -08:00
time.rs Capitalize "Rust" 2022-02-13 01:06:36 +01:00