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. 
16#![ allow( clippy:: float_cmp) ]  
27
38use  crate :: macros:: HirNode ; 
@@ -379,6 +384,8 @@ impl Ord for FullInt {
379384/// The context required to evaluate a constant expression. 
380385/// 
381386/// This is currently limited to constant folding and reading the value of named constants. 
387+ /// 
388+ /// See the module level documentation for some context. 
382389pub  struct  ConstEvalCtxt < ' tcx >  { 
383390    tcx :  TyCtxt < ' tcx > , 
384391    param_env :  ParamEnv < ' tcx > , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments