File tree 12 files changed +216
-0
lines changed
12 files changed +216
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135470
2
+ //@ compile-flags: --edition=2021 -Copt-level=0
3
+
4
+ use std:: future:: Future ;
5
+ trait Access {
6
+ type Lister ;
7
+
8
+ fn list ( ) -> impl Future < Output = Self :: Lister > {
9
+ async { todo ! ( ) }
10
+ }
11
+ }
12
+
13
+ trait Foo { }
14
+ impl Access for dyn Foo {
15
+ type Lister = ( ) ;
16
+ }
17
+
18
+ fn main ( ) {
19
+ let svc = async {
20
+ async { <dyn Foo >:: list ( ) } . await ;
21
+ } ;
22
+ & svc as & dyn Service ;
23
+ }
24
+
25
+ trait UnaryService {
26
+ fn call2 ( ) { }
27
+ }
28
+ trait Unimplemented { }
29
+ impl < T : Unimplemented > UnaryService for T { }
30
+ struct Wrap < T > ( T ) ;
31
+ impl < T : Send > UnaryService for Wrap < T > { }
32
+
33
+ trait Service {
34
+ fn call ( & self ) ;
35
+ }
36
+ impl < T : Send > Service for T {
37
+ fn call ( & self ) {
38
+ Wrap :: < T > :: call2 ( ) ;
39
+ }
40
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135474
2
+ fn retry ( ) -> impl Sized { }
3
+
4
+ struct Core < T > ( T ) ;
5
+
6
+ // Invalid type argument
7
+ impl Core < XXX > {
8
+ pub fn spawn ( self ) { }
9
+ }
10
+
11
+ fn main ( ) {
12
+ let core = Core ( 1 ) ;
13
+ // extraneous argument
14
+ core. spawn ( retry ( ) ) ;
15
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135528
2
+ //@ compile-flags: -Zvalidate-mir -Zinline-mir=yes
3
+ #![ feature( type_alias_impl_trait) ]
4
+ type Tait = impl Copy ;
5
+
6
+ fn set ( x : & isize ) -> isize {
7
+ * x
8
+ }
9
+
10
+ fn d ( x : Tait ) {
11
+ set ( x) ;
12
+ }
13
+
14
+ fn other_define ( ) -> Tait {
15
+ ( )
16
+ }
17
+
18
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135570
2
+ //@compile-flags: -Zvalidate-mir -Zmir-enable-passes=+Inline -Copt-level=0 -Zmir-enable-passes=+GVN
3
+
4
+ fn function_with_bytes < const BYTES : & ' static [ u8 ; 0xc7b889180b67b07d_bc1a3c88783d35b5_u128 ] > (
5
+ ) -> & ' static [ u8 ] {
6
+ BYTES
7
+ }
8
+
9
+ fn main ( ) {
10
+ function_with_bytes :: < b"aa" > ( ) == & [ ] ;
11
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135617
2
+ trait Project {
3
+ const ASSOC : usize ;
4
+ }
5
+
6
+ fn foo ( )
7
+ where
8
+ for < ' a > ( ) : Project ,
9
+ {
10
+ [ ( ) ; <( ) as Project >:: ASSOC ] ;
11
+ }
12
+
13
+ pub fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135646
2
+ //@ compile-flags: --edition=2024 -Zpolonius=next
3
+ fn main ( ) {
4
+ & { [ 1 , 2 , 3 ] [ 4 ] } ;
5
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135668
2
+ //@ compile-flags: --edition=2021
3
+ use std:: future:: Future ;
4
+
5
+ pub async fn foo ( ) {
6
+ let _ = create_task ( ) . await ;
7
+ }
8
+
9
+ async fn create_task ( ) -> impl Sized {
10
+ bind ( documentation)
11
+ }
12
+
13
+ async fn documentation ( ) {
14
+ include_str ! ( "nonexistent" ) ;
15
+ }
16
+
17
+ fn bind < F > ( _filter : F ) -> impl Sized
18
+ where
19
+ F : FilterBase ,
20
+ {
21
+ || -> <F as FilterBase >:: Assoc { panic ! ( ) }
22
+ }
23
+
24
+ trait FilterBase {
25
+ type Assoc ;
26
+ }
27
+
28
+ impl < F , R > FilterBase for F
29
+ where
30
+ F : Fn ( ) -> R ,
31
+ // Removing the below line makes it correctly error on both stable and beta
32
+ R : Future ,
33
+ // Removing the below line makes it ICE on both stable and beta
34
+ R : Send ,
35
+ // Removing the above two bounds makes it ICE on stable but correctly error on beta
36
+ {
37
+ type Assoc = F ;
38
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135718
2
+
3
+ struct Equal ;
4
+
5
+ struct Bar ;
6
+
7
+ trait TwiceNested { }
8
+ impl < M > TwiceNested for Bar where Bar : NestMakeEqual < NestEq = M > { }
9
+
10
+ struct Sum ;
11
+
12
+ trait Not {
13
+ fn not ( ) ;
14
+ }
15
+
16
+ impl < P > Not for Sum
17
+ where
18
+ Bar : NestMakeEqual < NestEq = P > ,
19
+ Self : Problem < P > ,
20
+ {
21
+ fn not ( ) { }
22
+ }
23
+
24
+ trait NestMakeEqual {
25
+ type NestEq ;
26
+ }
27
+
28
+ trait MakeEqual {
29
+ type Eq ;
30
+ }
31
+
32
+ struct Foo ;
33
+ impl MakeEqual for Foo {
34
+ type Eq = Equal ;
35
+ }
36
+
37
+ impl < O > NestMakeEqual for Bar
38
+ where
39
+ Foo : MakeEqual < Eq = O > ,
40
+ {
41
+ type NestEq = O ;
42
+ }
43
+
44
+ trait Problem < M > { }
45
+ impl Problem < ( ) > for Sum where Bar : TwiceNested { }
46
+ impl Problem < Equal > for Sum where Bar : TwiceNested { }
47
+
48
+ fn main ( ) {
49
+ Sum :: not ( ) ;
50
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135720
2
+ #![ feature( generic_const_exprs) ]
3
+ type S < ' l > = [ i32 ; A ] ;
4
+ fn lint_me ( x : S < ( ) > ) { }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135845
2
+ struct S < ' a , T : ?Sized > ( & ' a T ) ;
3
+
4
+ fn b < ' a > ( ) -> S < ' static , _ > {
5
+ S :: < ' a > ( & 0 )
6
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #135863
2
+ struct A ;
3
+
4
+ impl A {
5
+ fn len ( self : & & B ) { }
6
+ }
7
+
8
+ fn main ( ) {
9
+ A . len ( )
10
+ }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #136063
2
+ #![ feature( generic_const_exprs) ]
3
+ trait A < const B : u8 = X > { }
4
+ impl A < 1 > for bool { }
5
+ fn bar ( arg : & dyn A < x > ) { bar ( true ) }
6
+ pub fn main ( ) { }
You can’t perform that action at this time.
0 commit comments