summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/const_params_have_right_type.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/const_params_have_right_type.rs')
-rw-r--r--tests/ui/generic-associated-types/const_params_have_right_type.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/const_params_have_right_type.rs b/tests/ui/generic-associated-types/const_params_have_right_type.rs
new file mode 100644
index 000000000..d2cb12697
--- /dev/null
+++ b/tests/ui/generic-associated-types/const_params_have_right_type.rs
@@ -0,0 +1,10 @@
+trait Trait {
+ type Foo<const N: u8>;
+}
+
+impl Trait for () {
+ type Foo<const N: u64> = u32;
+ //~^ error: type `Foo` has an incompatible generic parameter for trait
+}
+
+fn main() {}