File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,7 @@ mod impls;
314
314
mod misc;
315
315
mod negation;
316
316
mod projection;
317
+ mod refs;
317
318
mod scalars;
318
319
mod tuples;
319
320
mod unify;
Original file line number Diff line number Diff line change
1
+ use super :: * ;
2
+
3
+ #[ test]
4
+ fn refs_are_well_formed ( ) {
5
+ test ! {
6
+ program { }
7
+
8
+ goal {
9
+ forall<' a, T > { WellFormed ( & ' a T ) }
10
+ } yields {
11
+ "Unique; substitution [], lifetime constraints []"
12
+ }
13
+ }
14
+ }
15
+
16
+ #[ test]
17
+ fn refs_are_sized ( ) {
18
+ test ! {
19
+ program {
20
+ #[ lang( sized) ]
21
+ trait Sized { }
22
+ }
23
+
24
+ goal {
25
+ forall<' a, T > { & ' a T : Sized }
26
+ } yields {
27
+ "Unique; substitution [], lifetime constraints []"
28
+ }
29
+ }
30
+ }
31
+
32
+ #[ test]
33
+ fn refs_are_copy ( ) {
34
+ test ! {
35
+ program {
36
+ #[ lang( copy) ]
37
+ trait Copy { }
38
+ }
39
+
40
+ goal {
41
+ forall<' a, T > { & ' a T : Copy }
42
+ } yields {
43
+ "Unique; substitution [], lifetime constraints []"
44
+ }
45
+ }
46
+ }
47
+
48
+ #[ test]
49
+ fn refs_are_clone ( ) {
50
+ test ! {
51
+ program {
52
+ #[ lang( clone) ]
53
+ trait Clone { }
54
+ }
55
+
56
+ goal {
57
+ forall<' a, T > { & ' a T : Clone }
58
+ } yields {
59
+ "Unique; substitution [], lifetime constraints []"
60
+ }
61
+ }
62
+ }
You can’t perform that action at this time.
0 commit comments