File tree 3 files changed +80
-0
lines changed
3 files changed +80
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ known-bug: #123629
2
+ #![ feature( generic_assert) ]
3
+
4
+ fn foo ( )
5
+ where
6
+ for < const N : usize = { assert ! ( u) } > ( ) : ,
7
+ {
8
+ }
9
+
10
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #127033
2
+ //@ compile-flags: --edition=2021
3
+
4
+ pub trait RaftLogStorage {
5
+ fn save_vote ( vote : ( ) ) -> impl std:: future:: Future + Send ;
6
+ }
7
+
8
+ struct X ;
9
+ impl RaftLogStorage for X {
10
+ fn save_vote ( vote : ( ) ) -> impl std:: future:: Future {
11
+ loop { }
12
+ async {
13
+ vote
14
+ }
15
+ }
16
+ }
17
+
18
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ //@ known-bug: #129372
2
+ //@ compile-flags: -Cdebuginfo=2 -Copt-level=0
3
+
4
+ pub struct Wrapper < T > ( T ) ;
5
+ struct Struct ;
6
+
7
+ pub trait TraitA {
8
+ type AssocA < ' t > ;
9
+ }
10
+ pub trait TraitB {
11
+ type AssocB ;
12
+ }
13
+
14
+ pub fn helper ( v : impl MethodTrait ) {
15
+ let _local_that_causes_ice = v. method ( ) ;
16
+ }
17
+
18
+ pub fn main ( ) {
19
+ helper ( Wrapper ( Struct ) ) ;
20
+ }
21
+
22
+ pub trait MethodTrait {
23
+ type Assoc < ' a > ;
24
+
25
+ fn method ( self ) -> impl for < ' a > FnMut ( & ' a ( ) ) -> Self :: Assoc < ' a > ;
26
+ }
27
+
28
+ impl < T : TraitB > MethodTrait for T
29
+ where
30
+ <T as TraitB >:: AssocB : TraitA ,
31
+ {
32
+ type Assoc < ' a > = <T :: AssocB as TraitA >:: AssocA < ' a > ;
33
+
34
+ fn method ( self ) -> impl for < ' a > FnMut ( & ' a ( ) ) -> Self :: Assoc < ' a > {
35
+ move |_| loop { }
36
+ }
37
+ }
38
+
39
+ impl < T , B > TraitB for Wrapper < B >
40
+ where
41
+ B : TraitB < AssocB = T > ,
42
+ {
43
+ type AssocB = T ;
44
+ }
45
+
46
+ impl TraitB for Struct {
47
+ type AssocB = Struct ;
48
+ }
49
+
50
+ impl TraitA for Struct {
51
+ type AssocA < ' t > = Self ;
52
+ }
You can’t perform that action at this time.
0 commit comments