diff options
Diffstat (limited to 'tests/ui/traits/negative-impls/negative-impls-basic.rs')
-rw-r--r-- | tests/ui/traits/negative-impls/negative-impls-basic.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/traits/negative-impls/negative-impls-basic.rs b/tests/ui/traits/negative-impls/negative-impls-basic.rs new file mode 100644 index 000000000..474e03817 --- /dev/null +++ b/tests/ui/traits/negative-impls/negative-impls-basic.rs @@ -0,0 +1,17 @@ +// A simple test that we are able to create negative impls, when the +// feature gate is given. +// +// run-pass + +#![feature(negative_impls)] +#![allow(dead_code)] + +struct TestType; + +trait TestTrait { + fn dummy(&self) {} +} + +impl !TestTrait for TestType {} + +fn main() {} |