File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed 
src/librustc_mir/dataflow/generic Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,18 @@ pub trait Analysis<'tcx>: AnalysisDomain<'tcx> {
172172        return_place :  & mir:: Place < ' tcx > , 
173173    ) ; 
174174
175-     /// Creates an  `Engine` to find the fixpoint for this dataflow problem. 
175+     /// Calls the appropriate  `Engine` constructor  to find the fixpoint for this dataflow problem. 
176176/// 
177- /// This is functionally equivalent to calling the appropriate `Engine` constructor. It should 
178- /// not be overridden. Its purpose is to allow consumers of this API to use method-chaining. 
177+ /// You shouldn't need to override this outside this module, since the combination of the 
178+ /// default impl and the one for all `A: GenKillAnalysis` will do the right thing. 
179+ /// Its purpose is to enable method chaining like so: 
180+ /// 
181+ /// ```ignore(cross-crate-imports) 
182+ /// let results = MyAnalysis::new(tcx, body) 
183+ ///     .into_engine(tcx, body, def_id) 
184+ ///     .iterate_to_fixpoint() 
185+ ///     .into_results_cursor(body); 
186+ /// ``` 
179187fn  into_engine ( 
180188        self , 
181189        tcx :  TyCtxt < ' tcx > , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments