rust/tests/ui/associated-item/associated-item-duplicate-bounds.rs

12 lines
241 B
Rust
Raw Normal View History

2020-02-02 17:55:11 +09:00
trait Adapter {
const LINKS: usize;
}
struct Foo<A: Adapter> {
adapter: A,
links: [u32; A::LINKS], // Shouldn't suggest bounds already there.
2020-11-17 11:44:21 +01:00
//~^ ERROR generic parameters may not be used in const operations
2020-02-02 17:55:11 +09:00
}
fn main() {}