rust-lang / const-eval

home for proposals in and around compile-time function evaluation
Apache License 2.0
105 stars 17 forks source link

Why can consts not refer to statics? #11

Open RalfJung opened 5 years ago

RalfJung commented 5 years ago

Is there some deep fundamental reason why that can never work, or is it a limitation of the current (or a former) implementation?

RalfJung commented 8 months ago

https://github.com/rust-lang/rust/pull/119614 proposes that we can unstably allow consts to refer to statics. Tracking issue: https://github.com/rust-lang/rust/issues/119618