5 // This tests the allocating algo branch of the
6 // inherent impls overlap checker.
7 // This branch was added by PR:
8 // https://github.com/rust-lang/rust/pull/78317
9 // In this test, we repeat many impl blocks
10 // to trigger the allocating branch.
18 repeat::repeat_with_idents!(impl Foo { fn IDENT() {} });
20 impl Foo { fn hello() {} } //~ERROR duplicate definitions with name `hello`
21 impl Foo { fn hello() {} }
27 repeat::repeat_with_idents!(impl Foo2 { fn IDENT() {} });
31 fn hello2() {} //~ERROR duplicate definitions with name `hello2`
39 // Slightly stronger transitive overlap
43 repeat::repeat_with_idents!(impl Foo3 { fn IDENT() {} });
46 fn bar() {} //~ERROR duplicate definitions with name `bar`
47 fn hello3() {} //~ERROR duplicate definitions with name `hello3`
62 repeat::repeat_with_idents!(impl Bar<A> { fn IDENT() {} });
64 impl Bar<A> { fn foo() {} fn bar2() {} }
67 fn bar2() {} //~ERROR duplicate definitions with name `bar2`
69 impl Bar<B> { fn bar2() {} }