Skip to content

Commit 6bf0f52

Browse files
committed
Pin tests.
1 parent 3c384b4 commit 6bf0f52

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

coretests/tests/pin.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ fn pin_const() {
3434
}
3535

3636
pin_mut_const();
37+
38+
// Check that we accept a Rust 2024 $expr.
39+
std::pin::pin!(const { 1 });
3740
}
3841

3942
#[allow(unused)]
@@ -83,14 +86,11 @@ mod pin_coerce_unsized {
8386
}
8487

8588
#[test]
86-
fn spans_2021() {
87-
// Check that we accept a Rust 2024 $expr.
88-
std::pin::pin!(const { 1 });
89-
89+
fn temp_lifetime() {
9090
// Check that temporary lifetimes work as in Rust 2021.
91+
// Regression test for https://github.com/rust-lang/rust/issues/138596
9192
match std::pin::pin!(foo(&mut 0)) {
92-
_f => {}
93+
_ => {}
9394
}
95+
async fn foo(_: &mut usize) {}
9496
}
95-
96-
async fn foo(_: &mut usize) {}

0 commit comments

Comments
 (0)