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