diff options
Diffstat (limited to 'tests/ui/associated-item/associated-item-duplicate-bounds.rs')
-rw-r--r-- | tests/ui/associated-item/associated-item-duplicate-bounds.rs | 11 |
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 000000000..242a02353 --- /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() {} |