summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/in-trait/generics-mismatch.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/async-await/in-trait/generics-mismatch.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/async-await/in-trait/generics-mismatch.rs b/tests/ui/async-await/in-trait/generics-mismatch.rs
new file mode 100644
index 000000000..fc29783c0
--- /dev/null
+++ b/tests/ui/async-await/in-trait/generics-mismatch.rs
@@ -0,0 +1,15 @@
+// edition: 2021
+
+#![feature(async_fn_in_trait)]
+#![allow(incomplete_features)]
+
+trait Foo {
+ async fn foo<T>();
+}
+
+impl Foo for () {
+ async fn foo<const N: usize>() {}
+ //~^ ERROR: method `foo` has an incompatible generic parameter for trait `Foo` [E0053]
+}
+
+fn main() {}