]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.rs
Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm
[rust.git] / tests / ui / associated-consts / issue-24949-assoc-const-static-recursion-trait.rs
1 // Check for recursion involving references to trait-associated const.
2
3 trait Foo {
4     const BAR: u32;
5 }
6
7 const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
8
9 struct GlobalTraitRef;
10
11 impl Foo for GlobalTraitRef {
12     const BAR: u32 = TRAIT_REF_BAR; //~ ERROR E0391
13 }
14
15 fn main() {}