Commit 6fd5cf5
committed
Add documentation to more
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.
* 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.From::from implementations.1 parent 887999d commit 6fd5cf5
16 files changed
+63
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2047 | 2047 | | |
2048 | 2048 | | |
2049 | 2049 | | |
| 2050 | + | |
| 2051 | + | |
2050 | 2052 | | |
2051 | 2053 | | |
2052 | 2054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| 1095 | + | |
| 1096 | + | |
1095 | 1097 | | |
1096 | 1098 | | |
1097 | 1099 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1953 | 1953 | | |
1954 | 1954 | | |
1955 | 1955 | | |
| 1956 | + | |
| 1957 | + | |
1956 | 1958 | | |
1957 | 1959 | | |
1958 | 1960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3018 | 3018 | | |
3019 | 3019 | | |
3020 | 3020 | | |
| 3021 | + | |
| 3022 | + | |
3021 | 3023 | | |
3022 | 3024 | | |
3023 | 3025 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2908 | 2908 | | |
2909 | 2909 | | |
2910 | 2910 | | |
2911 | | - | |
2912 | | - | |
2913 | | - | |
2914 | | - | |
2915 | 2911 | | |
2916 | 2912 | | |
2917 | 2913 | | |
2918 | 2914 | | |
2919 | 2915 | | |
2920 | 2916 | | |
2921 | 2917 | | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
2922 | 2923 | | |
2923 | 2924 | | |
2924 | 2925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| |||
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
| 1248 | + | |
1247 | 1249 | | |
1248 | 1250 | | |
1249 | 1251 | | |
| |||
1986 | 1988 | | |
1987 | 1989 | | |
1988 | 1990 | | |
| 1991 | + | |
1989 | 1992 | | |
1990 | 1993 | | |
1991 | 1994 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
541 | 545 | | |
542 | 546 | | |
543 | 547 | | |
| |||
547 | 551 | | |
548 | 552 | | |
549 | 553 | | |
| 554 | + | |
550 | 555 | | |
551 | 556 | | |
552 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
717 | 720 | | |
718 | 721 | | |
719 | 722 | | |
| |||
724 | 727 | | |
725 | 728 | | |
726 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
727 | 733 | | |
728 | 734 | | |
729 | 735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| |||
0 commit comments