]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-consts/shadowed-const.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / associated-consts / shadowed-const.rs
1 // Checking that none of these ICE, which was introduced in
2 // https://github.com/rust-lang/rust/issues/93553
3 trait Foo {
4     type Bar;
5 }
6
7 trait Baz: Foo {
8     const Bar: Self::Bar;
9 }
10
11 trait Baz2: Foo {
12     const Bar: u32;
13
14     fn foo() -> Self::Bar;
15 }
16
17 trait Baz3 {
18   const BAR: usize;
19   const QUX: Self::BAR;
20   //~^ ERROR found associated const
21 }
22
23 fn main() {}