about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/coretests/tests/pin.rs14
-rw-r--r--library/coretests/tests/pin_macro.rs17
2 files changed, 17 insertions, 14 deletions
diff --git a/library/coretests/tests/pin.rs b/library/coretests/tests/pin.rs
index a866cf12a3b..b3fb06e710d 100644
--- a/library/coretests/tests/pin.rs
+++ b/library/coretests/tests/pin.rs
@@ -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) {}
-}
diff --git a/library/coretests/tests/pin_macro.rs b/library/coretests/tests/pin_macro.rs
index 43542397a61..639eab740c0 100644
--- a/library/coretests/tests/pin_macro.rs
+++ b/library/coretests/tests/pin_macro.rs
@@ -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) {}
+}