onestacked
7355ab3fe3
Constify TypeId ordering impls
2023-01-16 21:26:03 +01:00
Albert Larsan
6d332c4a71
Fix core::any mod-level docs
2022-12-27 21:42:42 +01:00
Jake Goulding
260ec93478
Add Provider::{would_be_satisfied_by_value_of,would_be_satisfied_by_ref_of}
...
While the `provide_*` methods already short-circuit when a value has
been provided, there are times where an expensive computation is
needed to determine if the `provide_*` method can even be called.
2022-08-23 10:48:59 -04:00
Jake Goulding
38de102cff
Support eager and lazy methods for providing references and values
...
There are times where computing a value may be cheap, or where
computing a reference may be expensive, so this fills out the
possibilities.
2022-08-23 09:58:50 -04:00
Cameron Steffen
17ddcb434b
Improve primitive/std docs separation and headers
2022-08-20 16:50:29 -05:00
Nick Cameron
0c72be3e1a
core::any: replace some unstable generic types with impl Trait
...
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-07-05 15:06:31 +01:00
Benjamin Herr
74ef14830f
Fix typos in Provider API docs
2022-06-10 20:58:27 -07:00
Nick Cameron
66290109bb
Address reviewer comments
...
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-06 12:19:18 +01:00
Nick Cameron
2e0ca2537f
Add tracking issue number
...
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-06 12:10:14 +01:00
Nick Cameron
e82368d6fc
Add examples to docs
...
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-06 12:10:13 +01:00
Nick Cameron
17730e66f6
Update docs
...
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-06 12:10:13 +01:00
Nick Cameron
57d027d23a
Modify the signature of the request_* methods so that trait_upcasting is not required
...
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-06 12:10:13 +01:00
Nick Cameron
bb5db85f74
Add the Provider api to core::any
...
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-06 12:10:13 +01:00
T-O-R-U-S
72a25d05bf
Use implicit capture syntax in format_args
...
This updates the standard library's documentation to use the new syntax. The
documentation is worthwhile to update as it should be more idiomatic
(particularly for features like this, which are nice for users to get acquainted
with). The general codebase is likely more hassle than benefit to update: it'll
hurt git blame, and generally updates can be done by folks updating the code if
(and when) that makes things more readable with the new format.
A few places in the compiler and library code are updated (mostly just due to
already having been done when this commit was first authored).
2022-03-10 10:23:40 -05:00
AngelicosPhosphoros
72b0c8f233
Reverts #92135 because perf regression
2021-12-26 16:02:33 +03:00
AngelicosPhosphoros
756d163741
Add #[inline] modifier to TypeId::of
...
It was already inlined but it happened only in 4th InlinerPass on my testcase.
With `#[inline]` modifier it happens on 2nd pass.
Closes #74362
2021-12-20 23:08:57 +03:00
Ibraheem Ahmed
25271a5a98
fix doc links for downcast_unchecked
2021-11-20 18:22:05 -05:00
Ibraheem Ahmed
6f982930ba
add tracking issue for downcast_unchecked
2021-11-12 22:55:11 -05:00
Ibraheem Ahmed
29403eeef0
add unchecked downcast methods
2021-11-12 22:53:26 -05:00
John Kugelman
68b0d86294
Add #[must_use] to remaining core functions
2021-10-30 18:21:29 -04:00
xFrednet
d38f2b0cc1
Added diagnostic items to structs and traits for Clippy
2021-07-15 23:57:02 +02:00
Christiaan Dirkx
fdae75738b
Change the Debug impl of Any and UnsafeCell to use finish_non_exhaustive
2021-04-21 14:51:04 +02:00
Christiaan Dirkx
1fb3256fcb
Replace all fmt.pad with debug_struct
2021-04-21 14:38:24 +02:00
Vadim Petrochenkov
dac96d45af
Fix use of bare trait objects everywhere
2021-03-18 02:18:58 +03:00
Max Sharnoff
72a7f73610
Apply suggestions from code review
...
Co-authored-by: Camelid <camelidcamel@gmail.com>
2020-12-09 23:13:24 +00:00
sharnoff
1c36bb2f69
add docs note about Any::type_id on smart pointers
2020-12-09 22:43:59 +00:00
Ashley Mannix
0e2db57754
update tracking issue for const_type_id
2020-09-24 09:00:04 +10:00
Ashley Mannix
9b2c8d866e
revert const_type_id stabilization
...
This reverts commit e3856616ee .
2020-09-23 09:40:51 +10:00
Denis Vasilik
75c1e2dfbb
Use intra-doc links
2020-08-14 20:50:38 +02:00
Ashley Mannix
e3856616ee
bump const type id stabilization to 1.46.0
2020-07-28 13:30:29 +10:00
Ashley Mannix
cac16c9793
stabilize const_type_id feature
2020-07-28 13:30:29 +10:00
mark
2c31b45ae8
mv std libs to library/
2020-07-27 19:51:13 -05:00