File tree Expand file tree Collapse file tree 9 files changed +126
-0
lines changed Expand file tree Collapse file tree 9 files changed +126
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#124833
2+ #![ feature( generic_const_items) ]
3+
4+ trait Trait {
5+ const C <' a >: & ' a str ;
6+ }
7+
8+ impl Trait for ( ) {
9+ const C <' a >: = "C ";
10+ }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#124857
2+ //@ compile-flags: -Znext-solver=coherence
3+
4+ #![ feature( effects) ]
5+
6+ #[ const_trait]
7+ trait Foo { }
8+
9+ impl const Foo for i32 { }
10+
11+ impl < T > const Foo for T where T : ~const Foo { }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#124891
2+
3+ type Tait = impl FnOnce ( ) -> ( ) ;
4+
5+ fn reify_as_tait ( ) -> Thunk < Tait > {
6+ Thunk :: new ( |cont| cont)
7+ }
8+
9+ struct Thunk < F > ( F ) ;
10+
11+ impl < F > Thunk < F > {
12+ fn new ( f : F )
13+ where
14+ F : ContFn ,
15+ {
16+ todo ! ( ) ;
17+ }
18+ }
19+
20+ trait ContFn { }
21+
22+ impl < F : FnOnce ( Tait ) -> ( ) > ContFn for F { }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#124894
2+ //@ compile-flags: -Znext-solver=coherence
3+
4+ #![ feature( generic_const_exprs) ]
5+
6+ pub trait IsTrue < const mem: bool > { }
7+ impl < T > IsZST for T where ( ) : IsTrue < { std:: mem:: size_of :: < T > ( ) == 0 } > { }
8+
9+ pub trait IsZST { }
10+
11+ impl IsZST for IsZST { }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#125081
2+
3+ use std:: cell:: Cell ;
4+
5+ fn main ( ) {
6+ let _: Cell < & str , "a" > = Cell :: new ( ' β) ;
7+ }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#125099
2+
3+ pub trait ContFn < T > : Fn ( T ) -> Self :: Future {
4+ type Future ;
5+ }
6+ impl < T , F > ContFn < T > for F
7+ where
8+ F : Fn ( T ) ,
9+ {
10+ type Future = ( ) ;
11+ }
12+
13+ pub trait SeqHandler {
14+ type Requires ;
15+ fn process < F : ContFn < Self :: Requires > > ( ) -> impl Sized ;
16+ }
17+
18+ pub struct ConvertToU64 ;
19+ impl SeqHandler for ConvertToU64 {
20+ type Requires = u64 ;
21+ fn process < F : ContFn < Self :: Requires > > ( ) -> impl Sized { }
22+ }
23+
24+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#125155
2+
3+ enum NestedEnum {
4+ First ,
5+ Second ,
6+ Third
7+ }
8+ enum Enum {
9+ Variant2 ( Option < * mut & ' a & ' b ( ) > )
10+ }
11+
12+
13+ fn foo ( x : Enum ) -> isize {
14+ match x {
15+ Enum :: Variant2 ( NestedEnum :: Third ) => 4 ,
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#125185
2+ //@ compile-flags: -Zvalidate-mir
3+
4+ type Foo = impl Send ;
5+
6+ struct A ;
7+
8+ const VALUE : Foo = value ( ) ;
9+
10+ fn test ( foo : Foo < ' a > , f : impl for < ' b > FnMut ( ) ) {
11+ match VALUE {
12+ 0 | 0 => { }
13+
14+ _ => ( ) ,
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ //@ known-bug: rust-lang/rust#125185
2+ #![ feature( return_position_impl_trait_in_trait, return_type_notation) ]
3+
4+ trait IntFactory {
5+ fn stream ( & self ) -> impl IntFactory < stream ( ) : IntFactory < stream ( ) : Send > + Send > ;
6+ }
7+
8+ pub fn main ( ) { }
You can’t perform that action at this time.
0 commit comments