do something more careful than eval_const_expr · Issue #1417 · rust-lang/rust (original) (raw)

Eval_const_expr is used in the front end in several places. This code quasi-duplicates stuff that trans should probably be doing (in Graydon's words).

Any evaluation of compile-time values should likely be moved to a pass somewhere in the middle end. I assume there is a way to get a compile-time value out of LLVM, but I'm not sure.