1 error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR`
2 --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22
4 LL | const BAR: u32 = DEFAULT_REF_BAR;
7 note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
8 --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
10 LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
13 --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
15 LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 note: ...which requires const-evaluating + checking `FooDefault::BAR`...
18 --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
20 LL | const BAR: u32 = DEFAULT_REF_BAR;
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 note: ...which requires caching mir of `FooDefault::BAR` for CTFE...
23 --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
25 LL | const BAR: u32 = DEFAULT_REF_BAR;
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 = note: ...which again requires elaborating drops for `FooDefault::BAR`, completing the cycle
28 = note: cycle used when running analysis passes on this crate
30 error: aborting due to previous error
32 For more information about this error, try `rustc --explain E0391`.