Skip to content

Commit f9ecd13

Browse files
committed
Auto merge of #120136 - matthiaskrgr:rollup-3zzb0z9, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #117561 (Stabilize `slice_first_last_chunk`) - #117662 ([rustdoc] Allows links in headings) - #119815 (Format sources into the error message when loading codegen backends) - #119835 (Exhaustiveness: simplify empty pattern logic) - #119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - #120009 (never_patterns: typecheck never patterns) - #120122 (Don't add needs-triage to A-diagnostics) - #120126 (Suggest `.swap()` when encountering conflicting borrows from `mem::swap` on a slice) - #120134 (Restrict access to the private field of newtype indexes) Failed merges: - #119968 (Remove unused/unnecessary features) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 020c749 + 8e7a8d7 commit f9ecd13

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

tests/pass/async-fn.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ async fn uninhabited_variant() {
7676
fn run_fut<T>(fut: impl Future<Output = T>) -> T {
7777
use std::task::{Context, Poll, Waker};
7878

79-
let waker = Waker::noop();
80-
let mut context = Context::from_waker(&waker);
79+
let mut context = Context::from_waker(Waker::noop());
8180

8281
let mut pinned = Box::pin(fut);
8382
loop {

tests/pass/dyn-star.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ fn dispatch_on_pin_mut() {
9393
let mut fut = async_main();
9494

9595
// Poll loop, just to test the future...
96-
let waker = Waker::noop();
97-
let ctx = &mut Context::from_waker(&waker);
96+
let ctx = &mut Context::from_waker(Waker::noop());
9897

9998
loop {
10099
match unsafe { Pin::new_unchecked(&mut fut).poll(ctx) } {

tests/pass/future-self-referential.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ impl Future for DoStuff {
7777
}
7878

7979
fn run_fut<T>(fut: impl Future<Output = T>) -> T {
80-
let waker = Waker::noop();
81-
let mut context = Context::from_waker(&waker);
80+
let mut context = Context::from_waker(Waker::noop());
8281

8382
let mut pinned = pin!(fut);
8483
loop {
@@ -90,8 +89,7 @@ fn run_fut<T>(fut: impl Future<Output = T>) -> T {
9089
}
9190

9291
fn self_referential_box() {
93-
let waker = Waker::noop();
94-
let cx = &mut Context::from_waker(&waker);
92+
let cx = &mut Context::from_waker(Waker::noop());
9593

9694
async fn my_fut() -> i32 {
9795
let val = 10;

tests/pass/issues/issue-miri-2068.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ use std::task::{Context, Poll, Waker};
66

77
pub fn fuzzing_block_on<O, F: Future<Output = O>>(fut: F) -> O {
88
let mut fut = std::pin::pin!(fut);
9-
let waker = Waker::noop();
10-
let mut context = Context::from_waker(&waker);
9+
let mut context = Context::from_waker(Waker::noop());
1110
loop {
1211
match fut.as_mut().poll(&mut context) {
1312
Poll::Ready(v) => return v,

tests/pass/move-data-across-await-point.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ fn data_moved() {
5656
fn run_fut<T>(fut: impl Future<Output = T>) -> T {
5757
use std::task::{Context, Poll, Waker};
5858

59-
let waker = Waker::noop();
60-
let mut context = Context::from_waker(&waker);
59+
let mut context = Context::from_waker(Waker::noop());
6160

6261
let mut pinned = Box::pin(fut);
6362
loop {

0 commit comments

Comments
 (0)