granite-rust/library/core/tests
Matthias Krüger 455382d8df
Rollup merge of #119984 - kpreid:waker-noop, r=dtolnay
Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.

The advantage of this is that it does not need to be assigned to a variable to be used in a `Context` creation, which is the most common thing to want to do with a noop waker. It also avoids unnecessarily executing the dynamically dispatched drop function when the noop waker is dropped.

If an owned noop waker is desired, it can be created by cloning, but the reverse is harder to do since it requires declaring a constant. Alternatively, both versions could be provided, like `futures::task::noop_waker()` and `futures::task::noop_waker_ref()`, but that seems to me to be API clutter for a very small benefit, whereas having the `&'static` reference available is a large reduction in boilerplate.

[Previous discussion on the tracking issue starting here](https://github.com/rust-lang/rust/issues/98286#issuecomment-1862159766)
2024-01-19 19:27:01 +01:00
..
async_iter Remove unnecessary lets and borrowing from Waker::noop() usage. 2024-01-17 12:00:27 -08:00
fmt apply fmt 2024-01-11 15:04:48 +03:00
hash apply fmt 2024-01-11 15:04:48 +03:00
io Move BorrowedBuf and BorrowedCursor from std:io to core::io 2023-11-09 07:10:11 +09:00
iter apply fmt 2024-01-11 15:04:48 +03:00
net apply fmt 2024-01-11 15:04:48 +03:00
num remove redundant imports 2023-12-10 10:56:22 +08:00
ops Expand the docs for ops::ControlFlow a bit 2021-02-06 22:36:05 -08:00
panic Fix test (location_const_file) 2022-10-08 11:48:53 +00:00
alloc.rs Re-optimize Layout::array 2022-07-13 17:07:41 -07:00
any.rs Adjust library tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
array.rs apply fmt 2024-01-11 15:04:48 +03:00
ascii.rs introduce {char, u8}::is_ascii_octdigit 2022-09-27 11:55:13 +05:30
asserting.rs Spelling library/ 2023-04-26 02:10:22 -04:00
atomic.rs Adjust library tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
bool.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
cell.rs apply fmt 2024-01-11 15:04:48 +03:00
char.rs remove redundant imports 2023-12-10 10:56:22 +08:00
clone.rs Bump to latest beta compiler 2023-05-30 08:00:10 -04:00
cmp.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
const_ptr.rs cleanup code w/ pointers in std a little 2022-08-05 16:47:49 +04:00
convert.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
error.rs apply fmt 2024-01-11 15:04:48 +03:00
future.rs enable test_join test in Miri 2023-07-03 14:05:55 +02:00
intrinsics.rs Adjust library tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
lazy.rs Rollup merge of #110419 - jsoref:spelling-library, r=jyn514 2023-04-26 18:51:41 +02:00
lib.rs Stabilize slice_first_last_chunk 2024-01-10 03:06:49 -05:00
macros.rs Add the cfg_match! macro 2023-09-23 14:23:51 -03:00
manually_drop.rs Flip cfg's for bootstrap bump 2023-07-12 21:38:55 -04:00
mem.rs Stabilize const_maybe_uninit_zeroed 2023-11-04 15:27:25 -04:00
nonzero.rs remove redundant imports 2023-12-10 10:56:22 +08:00
ops.rs Test not never 2021-11-21 19:10:39 -08:00
option.rs apply fmt 2024-01-11 15:04:48 +03:00
panic.rs Add newlines 2022-09-27 19:23:52 +00:00
pattern.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
pin.rs Make some methods of Pin<&mut T> unstable const 2020-09-18 19:23:50 +02:00
pin_macro.rs Write {ui,} tests for pin_macro and pin! 2022-02-14 16:56:37 +01:00
ptr.rs apply fmt 2024-01-11 15:04:48 +03:00
result.rs Remove unstable Result::into_ok_or_err 2022-08-17 17:20:42 -07:00
simd.rs Fix library tests 2023-11-26 08:50:39 -05:00
slice.rs Rollup merge of #117561 - tgross35:split-array, r=scottmcm 2024-01-19 19:26:59 +01:00
str.rs Update paths in comments. 2022-12-30 14:00:42 +01:00
str_lossy.rs Expose Utf8Lossy as Utf8Chunks 2022-08-20 12:49:20 -04:00
task.rs Remove test of static Context 2023-01-02 10:33:23 -08:00
time.rs apply fmt 2024-01-11 15:04:48 +03:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
unicode.rs revert changes to unicode stability 2022-07-08 21:18:15 +00:00
waker.rs libcore tests: avoid int2ptr casts 2022-06-27 13:30:44 -04:00