]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait.rs
Rollup merge of #89888 - rusticstuff:download-ci-llvm-apple-arm64, r=Mark-Simulacrum
[rust.git] / src / test / 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; //~ ERROR E0391
8
9 struct GlobalTraitRef;
10
11 impl Foo for GlobalTraitRef {
12     const BAR: u32 = TRAIT_REF_BAR;
13 }
14
15 fn main() {}