Put pin!() tests in the right file.
This commit is contained in:
parent
3f690c2257
commit
c41476034d
2 changed files with 17 additions and 14 deletions
|
|
@ -34,9 +34,6 @@ fn pin_const() {
|
|||
}
|
||||
|
||||
pin_mut_const();
|
||||
|
||||
// Check that we accept a Rust 2024 $expr.
|
||||
std::pin::pin!(const { 1 });
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
|
|
@ -84,14 +81,3 @@ mod pin_coerce_unsized {
|
|||
arg
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(bootstrap))]
|
||||
fn temp_lifetime() {
|
||||
// Check that temporary lifetimes work as in Rust 2021.
|
||||
// Regression test for https://github.com/rust-lang/rust/issues/138596
|
||||
match std::pin::pin!(foo(&mut 0)) {
|
||||
_ => {}
|
||||
}
|
||||
async fn foo(_: &mut usize) {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,3 +30,20 @@ fn unsize_coercion() {
|
|||
let dyn_obj: Pin<&mut dyn Send> = pin!([PhantomPinned; 2]);
|
||||
stuff(dyn_obj);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rust_2024_expr() {
|
||||
// Check that we accept a Rust 2024 $expr.
|
||||
std::pin::pin!(const { 1 });
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(bootstrap))]
|
||||
fn temp_lifetime() {
|
||||
// Check that temporary lifetimes work as in Rust 2021.
|
||||
// Regression test for https://github.com/rust-lang/rust/issues/138596
|
||||
match std::pin::pin!(foo(&mut 0)) {
|
||||
_ => {}
|
||||
}
|
||||
async fn foo(_: &mut usize) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue