2020-04-28 18:29:26 -05:00
|
|
|
// Check for recursion involving references to trait-associated const.
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
const BAR: u32;
|
|
|
|
}
|
|
|
|
|
2022-03-08 11:20:31 -06:00
|
|
|
const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR;
|
2020-04-28 18:29:26 -05:00
|
|
|
|
|
|
|
struct GlobalTraitRef;
|
|
|
|
|
|
|
|
impl Foo for GlobalTraitRef {
|
2022-03-08 11:20:31 -06:00
|
|
|
const BAR: u32 = TRAIT_REF_BAR; //~ ERROR E0391
|
2020-04-28 18:29:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|