File tree 9 files changed +176
-0
lines changed
9 files changed +176
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ known-bug: #130797
2
+
3
+ trait Transform {
4
+ type Output < ' a > ;
5
+ }
6
+ trait Propagate < O > { }
7
+ trait AddChild < C > {
8
+ fn add_child ( & self ) { }
9
+ }
10
+
11
+ pub struct Node < T > ( T ) ;
12
+ impl < T > AddChild < Box < dyn for < ' b > Propagate < T :: Output < ' b > > > > for Node < T > where T : Transform { }
13
+
14
+ fn make_graph_root ( ) {
15
+ Node ( Dummy ) . add_child ( )
16
+ }
17
+
18
+ struct Dummy ;
19
+ impl Transform for Dummy {
20
+ type Output < ' a > = ( ) ;
21
+ }
22
+
23
+ pub fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #132103
2
+ //@compile-flags: -Zvalidate-mir --edition=2018 -Zinline-mir=yes
3
+ use core:: future:: { async_drop_in_place, Future } ;
4
+ use core:: mem:: { self } ;
5
+ use core:: pin:: pin;
6
+ use core:: task:: { Context , Waker } ;
7
+
8
+ async fn test_async_drop < T > ( x : T ) {
9
+ let mut x = mem:: MaybeUninit :: new ( x) ;
10
+ pin ! ( unsafe { async_drop_in_place( x. as_mut_ptr( ) ) } ) ;
11
+ }
12
+
13
+ fn main ( ) {
14
+ let waker = Waker :: noop ( ) ;
15
+ let mut cx = Context :: from_waker ( & waker) ;
16
+
17
+ let fut = pin ! ( async {
18
+ test_async_drop( test_async_drop( 0 ) ) . await ;
19
+ } ) ;
20
+ fut. poll ( & mut cx) ;
21
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #132960
2
+
3
+ #![ feature( adt_const_params, const_ptr_read, generic_const_exprs) ]
4
+
5
+ const fn concat_strs < const A : & ' static str , const B : & ' static str > ( ) -> & ' static str
6
+ where
7
+ [ ( ) ; A . len ( ) ] : ,
8
+ [ ( ) ; B . len ( ) ] : ,
9
+ [ ( ) ; A . len ( ) + B . len ( ) ] : ,
10
+ {
11
+ #[ repr( C ) ]
12
+ #[ repr( C ) ]
13
+
14
+ const fn concat_arr < const M : usize , const N : usize > ( a : [ u8 ; M ] , b : [ u8 ; N ] ) -> [ u8 ; M + N ] { }
15
+
16
+ struct Inner < const A : & ' static str , const B : & ' static str > ;
17
+ impl < const A : & ' static str , const B : & ' static str > Inner < A , B >
18
+ where
19
+ [ ( ) ; A . len ( ) ] : ,
20
+ [ ( ) ; B . len ( ) ] : ,
21
+ [ ( ) ; A . len ( ) + B . len ( ) ] : ,
22
+ {
23
+ const ABSTR : & ' static str = unsafe {
24
+ std:: str:: from_utf8_unchecked ( & concat_arr (
25
+ A . as_ptr ( ) . cast ( ) . read ( ) ,
26
+ B . as_ptr ( ) . cast ( ) . read ( ) ,
27
+ ) )
28
+ } ;
29
+ }
30
+
31
+ Inner :: < A , B > :: ABSTR
32
+ }
33
+
34
+ const FOO : & str = "foo" ;
35
+ const BAR : & str = "bar" ;
36
+ const FOOBAR : & str = concat_strs :: < FOO , BAR > ( ) ;
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #133117
2
+
3
+ fn main ( ) {
4
+ match ( ) {
5
+ ( !|!) if true => { }
6
+ ( !|!) if true => { }
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #133252
2
+ //@ edition:2021
3
+ use std:: future:: Future ;
4
+
5
+ trait Owned : ' static { }
6
+ fn ice ( ) -> impl Future < Output = & ' static dyn Owned > {
7
+ async {
8
+ let not_static = 0 ;
9
+ force_send ( async_load ( & not_static) ) ;
10
+ loop { }
11
+ }
12
+ }
13
+
14
+ fn force_send < T : Send > ( _: T ) { }
15
+
16
+ fn async_load < ' a , T : LoadQuery < ' a > > ( this : T ) -> impl Future {
17
+ async {
18
+ this. get_future ( ) . await ;
19
+ }
20
+ }
21
+
22
+ trait LoadQuery < ' a > : Sized {
23
+ type LoadFuture : Future ;
24
+
25
+ fn get_future ( self ) -> Self :: LoadFuture {
26
+ loop { }
27
+ }
28
+ }
29
+
30
+ impl < ' a > LoadQuery < ' a > for & ' a u8 {
31
+ type LoadFuture = SimpleFuture ;
32
+ }
33
+
34
+ struct SimpleFuture ;
35
+ impl Future for SimpleFuture {
36
+ type Output = ( ) ;
37
+ fn poll (
38
+ self : std:: pin:: Pin < & mut Self > ,
39
+ _: & mut std:: task:: Context < ' _ > ,
40
+ ) -> std:: task:: Poll < Self :: Output > {
41
+ loop { }
42
+ }
43
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #133613
2
+
3
+ struct Wrapper < ' a > ( ) ;
4
+
5
+ trait IntFactory {
6
+ fn stream ( & self ) -> impl IntFactory < stream ( ..) : IntFactory < stream ( ..) : Send > > ;
7
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #134175
2
+ //@compile-flags: -Zvalidate-mir -Zinline-mir=yes
3
+ use std:: vec:: IntoIter ;
4
+
5
+ pub ( crate ) trait Foo : Iterator < Item = <Self as Foo >:: Key > {
6
+ type Key ;
7
+ }
8
+
9
+ impl Foo for IntoIter < i16 > { }
10
+
11
+ fn sum_foo < F : Foo < Key = i32 > > ( f : F ) -> i32 {
12
+ f. fold ( 0 , |a, b| a + b)
13
+ }
14
+
15
+ fn main ( ) {
16
+ let x = sum_foo ( vec ! [ 11 , 10 , 1 ] . into_iter ( ) ) ;
17
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #134334
2
+ //@ only-x86_64
3
+
4
+ #[ repr( simd) ]
5
+ struct A ( ) ;
6
+
7
+ fn main ( ) {
8
+ std:: arch:: asm!( "{}" , in( xmm_reg) A ( ) ) ;
9
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #134335
2
+ //@compile-flags: -Zunstable-options --edition=2024 --crate-type=lib
3
+ pub async fn async_closure ( x : & mut i32 ) {
4
+ let c = async move || {
5
+ * x += 1 ;
6
+ } ;
7
+ call_once ( c) . await ;
8
+ }
9
+
10
+ fn call_once < T > ( f : impl FnOnce ( ) -> T ) -> T {
11
+ f ( )
12
+ }
You can’t perform that action at this time.
0 commit comments