]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / associated-consts / issue-24949-assoc-const-static-recursion-trait-default.stderr
1 error[E0391]: cycle detected when elaborating drops for `FooDefault::BAR`
2   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:22
3    |
4 LL |     const BAR: u32 = DEFAULT_REF_BAR;
5    |                      ^^^^^^^^^^^^^^^
6    |
7 note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
8   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
9    |
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
14    |
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
19    |
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
24    |
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
29
30 error: aborting due to previous error
31
32 For more information about this error, try `rustc --explain E0391`.