File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,6 @@ 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 } ) ;
4037}
4138
4239#[ allow( unused) ]
@@ -84,14 +81,3 @@ mod pin_coerce_unsized {
8481 arg
8582 }
8683}
87-
88- #[ test]
89- #[ cfg( not( bootstrap) ) ]
90- fn temp_lifetime ( ) {
91- // Check that temporary lifetimes work as in Rust 2021.
92- // Regression test for https://github.com/rust-lang/rust/issues/138596
93- match std:: pin:: pin!( foo( & mut 0 ) ) {
94- _ => { }
95- }
96- async fn foo ( _: & mut usize ) { }
97- }
Original file line number Diff line number Diff line change @@ -30,3 +30,20 @@ fn unsize_coercion() {
3030 let dyn_obj: Pin < & mut dyn Send > = pin ! ( [ PhantomPinned ; 2 ] ) ;
3131 stuff ( dyn_obj) ;
3232}
33+
34+ #[ test]
35+ fn rust_2024_expr ( ) {
36+ // Check that we accept a Rust 2024 $expr.
37+ std:: pin:: pin!( const { 1 } ) ;
38+ }
39+
40+ #[ test]
41+ #[ cfg( not( bootstrap) ) ]
42+ fn temp_lifetime ( ) {
43+ // Check that temporary lifetimes work as in Rust 2021.
44+ // Regression test for https://github.com/rust-lang/rust/issues/138596
45+ match std:: pin:: pin!( foo( & mut 0 ) ) {
46+ _ => { }
47+ }
48+ async fn foo ( _: & mut usize ) { }
49+ }
You can’t perform that action at this time.
0 commit comments