File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ mod coherence_overlap;
5
5
mod consts;
6
6
mod decl_safety;
7
7
mod functions;
8
+ mod well_formed_trait_ref;
8
9
9
10
#[ test]
10
11
fn parser ( ) {
Original file line number Diff line number Diff line change
1
+ #![ allow( non_snake_case) ]
2
+
3
+ #[ test]
4
+ fn dependent_where_clause ( ) {
5
+ crate :: assert_ok!(
6
+ //@check-pass
7
+ [
8
+ crate foo {
9
+ trait Trait1 { }
10
+
11
+ trait Trait2 { }
12
+
13
+ struct S1 <ty T > where T : Trait1 {
14
+ dummy: T ,
15
+ }
16
+
17
+ struct S2 <ty T > where T : Trait1 , S1 <T > : Trait2 {
18
+ dummy: T ,
19
+ }
20
+ }
21
+ ]
22
+
23
+ expect_test:: expect![ "()" ]
24
+ )
25
+ }
26
+
27
+ #[ test]
28
+ fn missing_dependent_where_clause ( ) {
29
+ crate :: assert_err!(
30
+ [
31
+ crate foo {
32
+ trait Trait1 { }
33
+
34
+ trait Trait2 { }
35
+
36
+ struct S1 <ty T > where T : Trait1 {
37
+ dummy: T ,
38
+ }
39
+
40
+ struct S2 <ty T > where S1 <T > : Trait2 {
41
+ dummy: T ,
42
+ }
43
+ }
44
+ ]
45
+
46
+ [ /* TODO */ ]
47
+
48
+ expect_test:: expect![ [ r#"..."# ] ]
49
+ )
50
+ }
You can’t perform that action at this time.
0 commit comments