summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-item/associated-item-duplicate-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-item/associated-item-duplicate-bounds.rs')
-rw-r--r--src/test/ui/associated-item/associated-item-duplicate-bounds.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/associated-item/associated-item-duplicate-bounds.rs b/src/test/ui/associated-item/associated-item-duplicate-bounds.rs
new file mode 100644
index 000000000..242a02353
--- /dev/null
+++ b/src/test/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() {}