1 A compile-time const variable is referring to a thread-local static variable.
3 Erroneous code example:
6 #![feature(thread_local)]
11 const Y: usize = 2 * X;
14 Static and const variables can refer to other const variables but a const
15 variable cannot refer to a thread-local static variable. In this example,
16 `Y` cannot refer to `X`. To fix this, the value can be extracted as a const
20 #![feature(thread_local)]
27 const Y: usize = 2 * C;