summaryrefslogtreecommitdiffstats
path: root/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.rs')
-rw-r--r--tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.rs b/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.rs
new file mode 100644
index 000000000..4760ca548
--- /dev/null
+++ b/tests/ui/enum-discriminant/forbidden-discriminant-kind-impl.rs
@@ -0,0 +1,14 @@
+#![feature(discriminant_kind)]
+
+use std::marker::DiscriminantKind;
+
+enum Uninhabited {}
+
+struct NewType;
+
+impl DiscriminantKind for NewType {
+ //~^ ERROR explicit impls for the `DiscriminantKind` trait are not permitted
+ type Discriminant = Uninhabited;
+}
+
+fn main() {}