mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-05 14:37:37 +00:00
16 lines
280 B
Rust
16 lines
280 B
Rust
![]() |
// Check for recursion involving references to trait-associated const.
|
||
|
|
||
|
trait Foo {
|
||
|
const BAR: u32;
|
||
|
}
|
||
|
|
||
|
const TRAIT_REF_BAR: u32 = <GlobalTraitRef>::BAR; //~ ERROR E0391
|
||
|
|
||
|
struct GlobalTraitRef;
|
||
|
|
||
|
impl Foo for GlobalTraitRef {
|
||
|
const BAR: u32 = TRAIT_REF_BAR;
|
||
|
}
|
||
|
|
||
|
fn main() {}
|