diff --git a/tests/test/slices.rs b/tests/test/slices.rs index a4260461b3d..89ea71dcf64 100644 --- a/tests/test/slices.rs +++ b/tests/test/slices.rs @@ -29,3 +29,35 @@ fn slices_are_well_formed() { } } } + +#[test] +fn slices_are_not_copy() { + test! { + program { + #[lang(copy)] + trait Copy { } + } + + goal { + forall { not { [T]: Copy } } + } yields { + "Unique; substitution [], lifetime constraints []" + } + } +} + +#[test] +fn slices_are_not_clone() { + test! { + program { + #[lang(clone)] + trait Clone { } + } + + goal { + forall { not { [T]: Clone } } + } yields { + "Unique; substitution [], lifetime constraints []" + } + } +}