File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
use super :: * ;
2
2
3
3
#[ test]
4
- fn refs_are_well_formed ( ) {
4
+ fn immut_refs_are_well_formed ( ) {
5
5
test ! {
6
6
program { }
7
7
@@ -14,7 +14,7 @@ fn refs_are_well_formed() {
14
14
}
15
15
16
16
#[ test]
17
- fn refs_are_sized ( ) {
17
+ fn immut_refs_are_sized ( ) {
18
18
test ! {
19
19
program {
20
20
#[ lang( sized) ]
@@ -29,6 +29,35 @@ fn refs_are_sized() {
29
29
}
30
30
}
31
31
32
+ #[ test]
33
+ fn mut_refs_are_well_formed ( ) {
34
+ test ! {
35
+ program { }
36
+
37
+ goal {
38
+ forall<' a, T > { WellFormed ( & ' a mut T ) }
39
+ } yields {
40
+ "Unique; substitution [], lifetime constraints []"
41
+ }
42
+ }
43
+ }
44
+
45
+ #[ test]
46
+ fn mut_refs_are_sized ( ) {
47
+ test ! {
48
+ program {
49
+ #[ lang( sized) ]
50
+ trait Sized { }
51
+ }
52
+
53
+ goal {
54
+ forall<' a, T > { & ' a mut T : Sized }
55
+ } yields {
56
+ "Unique; substitution [], lifetime constraints []"
57
+ }
58
+ }
59
+ }
60
+
32
61
#[ test]
33
62
fn immut_refs_are_copy ( ) {
34
63
test ! {
You can’t perform that action at this time.
0 commit comments