Follow-up to #66866: @oli-obk agreed to move eval_const_fn_call to const_eval.rs. Generally I propose that interp should not contain code that is only needed by CTFE. We have intern.rs and snapshot.rs in there are they need some very deep access to Miri engine internals, but at least those are separate modules.
Also, const_eval.rs has grown pretty messy, and it does not seem like the order of definitions in that file follows any principle. We could split the file into two similar to what I did with Miri: const_eval/engine.rs for implementing the machine trait and defining everything that is needed during CTFE execution, and const_eval/eval.rs for defining the setup functions and all the glue that connects CTFE with the rest of the compiler.
Follow-up to #66866: @oli-obk agreed to move
eval_const_fn_calltoconst_eval.rs. Generally I propose thatinterpshould not contain code that is only needed by CTFE. We haveintern.rsandsnapshot.rsin there are they need some very deep access to Miri engine internals, but at least those are separate modules.Also,
const_eval.rshas grown pretty messy, and it does not seem like the order of definitions in that file follows any principle. We could split the file into two similar to what I did with Miri:const_eval/engine.rsfor implementing the machine trait and defining everything that is needed during CTFE execution, andconst_eval/eval.rsfor defining the setup functions and all the glue that connects CTFE with the rest of the compiler.