Skip to content

Commit

Permalink
Auto merge of #120136 - matthiaskrgr:rollup-3zzb0z9, r=matthiaskrgr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Jan 20, 2024
2 parents 020c749 + 8e7a8d7 commit f9ecd13
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions tests/pass/async-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ async fn uninhabited_variant() {
fn run_fut<T>(fut: impl Future<Output = T>) -> T {
use std::task::{Context, Poll, Waker};

let waker = Waker::noop();
let mut context = Context::from_waker(&waker);
let mut context = Context::from_waker(Waker::noop());

let mut pinned = Box::pin(fut);
loop {
Expand Down
3 changes: 1 addition & 2 deletions tests/pass/dyn-star.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ fn dispatch_on_pin_mut() {
let mut fut = async_main();

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

loop {
match unsafe { Pin::new_unchecked(&mut fut).poll(ctx) } {
Expand Down
6 changes: 2 additions & 4 deletions tests/pass/future-self-referential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ impl Future for DoStuff {
}

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

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

fn self_referential_box() {
let waker = Waker::noop();
let cx = &mut Context::from_waker(&waker);
let cx = &mut Context::from_waker(Waker::noop());

async fn my_fut() -> i32 {
let val = 10;
Expand Down
3 changes: 1 addition & 2 deletions tests/pass/issues/issue-miri-2068.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ use std::task::{Context, Poll, Waker};

pub fn fuzzing_block_on<O, F: Future<Output = O>>(fut: F) -> O {
let mut fut = std::pin::pin!(fut);
let waker = Waker::noop();
let mut context = Context::from_waker(&waker);
let mut context = Context::from_waker(Waker::noop());
loop {
match fut.as_mut().poll(&mut context) {
Poll::Ready(v) => return v,
Expand Down
3 changes: 1 addition & 2 deletions tests/pass/move-data-across-await-point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ fn data_moved() {
fn run_fut<T>(fut: impl Future<Output = T>) -> T {
use std::task::{Context, Poll, Waker};

let waker = Waker::noop();
let mut context = Context::from_waker(&waker);
let mut context = Context::from_waker(Waker::noop());

let mut pinned = Box::pin(fut);
loop {
Expand Down

0 comments on commit f9ecd13

Please sign in to comment.