We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Copy
Clone
1 parent ee4b03f commit 4d440e9Copy full SHA for 4d440e9
tests/test/slices.rs
@@ -29,3 +29,35 @@ fn slices_are_well_formed() {
29
}
30
31
32
+
33
+#[test]
34
+fn slices_are_not_copy() {
35
+ test! {
36
+ program {
37
+ #[lang(copy)]
38
+ trait Copy { }
39
+ }
40
41
+ goal {
42
+ forall<T> { not { [T]: Copy } }
43
+ } yields {
44
+ "Unique; substitution [], lifetime constraints []"
45
46
47
+}
48
49
50
+fn slices_are_not_clone() {
51
52
53
+ #[lang(clone)]
54
+ trait Clone { }
55
56
57
58
+ forall<T> { not { [T]: Clone } }
59
60
61
62
63
0 commit comments