about summary refs log tree commit diff
path: root/tests/ui/associated-item/associated-item-duplicate-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/associated-item/associated-item-duplicate-bounds.rs')
-rw-r--r--tests/ui/associated-item/associated-item-duplicate-bounds.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/associated-item/associated-item-duplicate-bounds.rs b/tests/ui/associated-item/associated-item-duplicate-bounds.rs
new file mode 100644
index 00000000000..242a02353a1
--- /dev/null
+++ b/tests/ui/associated-item/associated-item-duplicate-bounds.rs
@@ -0,0 +1,11 @@
+trait Adapter {
+    const LINKS: usize;
+}
+
+struct Foo<A: Adapter> {
+    adapter: A,
+    links: [u32; A::LINKS], // Shouldn't suggest bounds already there.
+    //~^ ERROR generic parameters may not be used in const operations
+}
+
+fn main() {}