]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-consts/issue-24949-assoc-const-static-recursion-trait-default.stderr
unboxed-closures and type-alias-impl-trait nll revisions
[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:5
3    |
4 LL |     const BAR: u32 = DEFAULT_REF_BAR;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: ...which requires normalizing `DEFAULT_REF_BAR`...
8 note: ...which requires simplifying constant for the type system `DEFAULT_REF_BAR`...
9   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
10    |
11 LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
12    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 note: ...which requires simplifying constant for the type system `DEFAULT_REF_BAR`...
14   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
15    |
16 LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
17    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 note: ...which requires const-evaluating + checking `DEFAULT_REF_BAR`...
19   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:11:1
20    |
21 LL | const DEFAULT_REF_BAR: u32 = <GlobalDefaultRef>::BAR;
22    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23    = note: ...which requires normalizing `<GlobalDefaultRef as FooDefault>::BAR`...
24 note: ...which requires simplifying constant for the type system `FooDefault::BAR`...
25   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
26    |
27 LL |     const BAR: u32 = DEFAULT_REF_BAR;
28    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 note: ...which requires simplifying constant for the type system `FooDefault::BAR`...
30   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
31    |
32 LL |     const BAR: u32 = DEFAULT_REF_BAR;
33    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 note: ...which requires const-evaluating + checking `FooDefault::BAR`...
35   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
36    |
37 LL |     const BAR: u32 = DEFAULT_REF_BAR;
38    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 note: ...which requires caching mir of `FooDefault::BAR` for CTFE...
40   --> $DIR/issue-24949-assoc-const-static-recursion-trait-default.rs:8:5
41    |
42 LL |     const BAR: u32 = DEFAULT_REF_BAR;
43    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44    = note: ...which again requires elaborating drops for `FooDefault::BAR`, completing the cycle
45    = note: cycle used when running analysis passes on this crate
46
47 error: aborting due to previous error
48
49 For more information about this error, try `rustc --explain E0391`.