summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/const_params_have_right_type.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/const_params_have_right_type.stderr')
-rw-r--r--tests/ui/generic-associated-types/const_params_have_right_type.stderr16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/const_params_have_right_type.stderr b/tests/ui/generic-associated-types/const_params_have_right_type.stderr
new file mode 100644
index 000000000..fdedd3bf5
--- /dev/null
+++ b/tests/ui/generic-associated-types/const_params_have_right_type.stderr
@@ -0,0 +1,16 @@
+error[E0053]: type `Foo` has an incompatible generic parameter for trait `Trait`
+ --> $DIR/const_params_have_right_type.rs:6:14
+ |
+LL | trait Trait {
+ | -----
+LL | type Foo<const N: u8>;
+ | ----------- expected const parameter of type `u8`
+...
+LL | impl Trait for () {
+ | -----------------
+LL | type Foo<const N: u64> = u32;
+ | ^^^^^^^^^^^^ found const parameter of type `u64`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0053`.