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 11use super :: * ;
22
33#[ test]
4- fn refs_are_well_formed ( ) {
4+ fn immut_refs_are_well_formed ( ) {
55 test ! {
66 program { }
77
@@ -14,7 +14,7 @@ fn refs_are_well_formed() {
1414}
1515
1616#[ test]
17- fn refs_are_sized ( ) {
17+ fn immut_refs_are_sized ( ) {
1818 test ! {
1919 program {
2020 #[ lang( sized) ]
@@ -29,6 +29,35 @@ fn refs_are_sized() {
2929 }
3030}
3131
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+
3261#[ test]
3362fn immut_refs_are_copy ( ) {
3463 test ! {
You can’t perform that action at this time.
0 commit comments