rust/library
Matthias Krüger a643e59800
Rollup merge of #91828 - oxalica:feat/waker-getters, r=dtolnay
Implement `RawWaker` and `Waker` getters for underlying pointers

implement #87021

New APIs:
- `RawWaker::data(&self) -> *const ()`
- `RawWaker::vtable(&self) -> &'static RawWakerVTable`
- ~`Waker::as_raw_waker(&self) -> &RawWaker`~ `Waker::as_raw(&self) -> &RawWaker`

This third one is an auxiliary function to make the two APIs above more useful. Since we can only get `&Waker` in `Future::poll`, without this, we need to `transmute` it into `&RawWaker` (relying on `repr(transparent)`) in order to access its data/vtable pointers.

~Not sure if it should be named `as_raw` or `as_raw_waker`. Seems we always use `as_<something-raw>` instead of just `as_raw`. But `as_raw_waker` seems not quite consistent with `Waker::from_raw`.~ As suggested in https://github.com/rust-lang/rust/pull/91828#discussion_r770729837, use `as_raw`.
2022-02-01 16:08:02 +01:00
..
alloc Rollup merge of #92887 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum 2022-01-30 08:37:46 -08:00
backtrace@b02ed04a7e Updated backtrace submodule 2021-11-02 12:31:34 +01:00
core Rollup merge of #91828 - oxalica:feat/waker-getters, r=dtolnay 2022-02-01 16:08:02 +01:00
panic_abort Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
panic_unwind adapt L4Bender implementation 2022-01-21 16:50:33 +01:00
portable-simd Merge commit '533f0fc81ab9ba097779fcd27c8f9ea12261fef5' into psimd 2021-12-17 15:10:53 +08:00
proc_macro Auto merge of #92598 - Badel2:panic-update-hook, r=yaahc 2022-01-16 02:18:42 +00:00
profiler_builtins Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rtstartup Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
rustc-std-workspace-alloc Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Rollup merge of #93504 - solid-rs:fix-kmc-solid-stack-size, r=nagisa 2022-01-31 20:12:59 -08:00
stdarch@eaee02ffdf Update stdarch submodule 2022-01-28 12:46:22 +00:00
test eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
unwind Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00