chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

32
vendor/futures/tests/future_join.rs vendored Normal file
View File

@@ -0,0 +1,32 @@
use futures::executor::block_on;
use futures::future::{self, Future};
use std::task::Poll;
/// This tests verifies (through miri) that self-referencing
/// futures are not invalidated when joining them.
#[test]
fn futures_join_macro_self_referential() {
block_on(async { futures::join!(yield_now(), trouble()) });
}
async fn trouble() {
let lucky_number = 42;
let problematic_variable = &lucky_number;
yield_now().await;
// problematic dereference
let _ = { *problematic_variable };
}
fn yield_now() -> impl Future<Output = ()> {
let mut yielded = false;
future::poll_fn(move |cx| {
if core::mem::replace(&mut yielded, true) {
Poll::Ready(())
} else {
cx.waker().wake_by_ref();
Poll::Pending
}
})
}