about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2025-03-19 17:42:43 +0100
committerMara Bos <m-ou.se@m-ou.se>2025-03-19 17:42:43 +0100
commit93d5ca82b0b1e9cb3aff5939b2a10731caea32f1 (patch)
tree89e44718d7b61ae3c1ec3c8ca1dcbb61b0199917
parent7c085f7ffdf731175430b908bc11bd97282cff9e (diff)
downloadrust-93d5ca82b0b1e9cb3aff5939b2a10731caea32f1.tar.gz
rust-93d5ca82b0b1e9cb3aff5939b2a10731caea32f1.zip
Pin tests.
-rw-r--r--library/coretests/tests/pin.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/coretests/tests/pin.rs b/library/coretests/tests/pin.rs
index d31b24144e2..43f0448f006 100644
--- a/library/coretests/tests/pin.rs
+++ b/library/coretests/tests/pin.rs
@@ -34,6 +34,9 @@ fn pin_const() {
     }
 
     pin_mut_const();
+
+    // Check that we accept a Rust 2024 $expr.
+    std::pin::pin!(const { 1 });
 }
 
 #[allow(unused)]
@@ -83,14 +86,11 @@ mod pin_coerce_unsized {
 }
 
 #[test]
-fn spans_2021() {
-    // Check that we accept a Rust 2024 $expr.
-    std::pin::pin!(const { 1 });
-
+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)) {
-        _f => {}
+        _ => {}
     }
+    async fn foo(_: &mut usize) {}
 }
-
-async fn foo(_: &mut usize) {}