Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions library/coretests/tests/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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) {}
}
17 changes: 17 additions & 0 deletions library/coretests/tests/pin_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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