File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change
1
+ //! A simple const eval API, for use on arbitrary HIR expressions.
2
+ //!
3
+ //! This cannot use rustc's const eval, aka miri, as arbitrary HIR expressions cannot be lowered to
4
+ //! executable MIR bodies, so we have to do this instead. If HIR expressions gain the ability to be
5
+ //! lowered to executable MIR bodies, this should be removed.
1
6
#![ allow( clippy:: float_cmp) ]
2
7
3
8
use crate :: macros:: HirNode ;
@@ -379,6 +384,8 @@ impl Ord for FullInt {
379
384
/// The context required to evaluate a constant expression.
380
385
///
381
386
/// This is currently limited to constant folding and reading the value of named constants.
387
+ ///
388
+ /// See the module level documentation for some context.
382
389
pub struct ConstEvalCtxt < ' tcx > {
383
390
tcx : TyCtxt < ' tcx > ,
384
391
param_env : ParamEnv < ' tcx > ,
You can’t perform that action at this time.
0 commit comments