@@ -32,7 +32,6 @@ use rustc_incremental;
32
32
use rustc_resolve:: { MakeGlobMap , Resolver } ;
33
33
use rustc_metadata:: creader:: CrateLoader ;
34
34
use rustc_metadata:: cstore:: { self , CStore } ;
35
- use rustc_trans as trans;
36
35
use rustc_trans_utils:: trans_crate:: TransCrate ;
37
36
use rustc_typeck as typeck;
38
37
use rustc_privacy;
@@ -41,7 +40,6 @@ use rustc_plugin as plugin;
41
40
use rustc_passes:: { self , ast_validation, no_asm, loops, consts, static_recursion, hir_stats} ;
42
41
use rustc_const_eval:: { self , check_match} ;
43
42
use super :: Compilation ;
44
- use :: DefaultTransCrate ;
45
43
46
44
use serialize:: json;
47
45
@@ -207,7 +205,7 @@ pub fn compile_input<Trans: TransCrate>(sess: &Session,
207
205
None
208
206
} ;
209
207
210
- phase_3_run_analysis_passes<Trans , _, _>( sess,
208
+ phase_3_run_analysis_passes :: < Trans , _ , _ > ( sess,
211
209
cstore,
212
210
hir_map,
213
211
analysis,
@@ -387,7 +385,7 @@ impl<'a> PhaseController<'a> {
387
385
/// State that is passed to a callback. What state is available depends on when
388
386
/// during compilation the callback is made. See the various constructor methods
389
387
/// (`state_*`) in the impl to see which data is provided for any given entry point.
390
- pub struct CompileState < ' a , ' tcx : ' a > {
388
+ pub struct CompileState < ' a , ' tcx : ' a , Trans : TransCrate > {
391
389
pub input : & ' a Input ,
392
390
pub session : & ' tcx Session ,
393
391
pub krate : Option < ast:: Crate > ,
@@ -405,10 +403,10 @@ pub struct CompileState<'a, 'tcx: 'a> {
405
403
pub resolutions : Option < & ' a Resolutions > ,
406
404
pub analysis : Option < & ' a ty:: CrateAnalysis > ,
407
405
pub tcx : Option < TyCtxt < ' a , ' tcx , ' tcx > > ,
408
- pub trans : Option < & ' a trans :: CrateTranslation > ,
406
+ pub trans : Option < & ' a < Trans as TransCrate > :: TranslatedCrate > ,
409
407
}
410
408
411
- impl < ' a , ' tcx > CompileState < ' a , ' tcx > {
409
+ impl < ' a , ' tcx , Trans : TransCrate > CompileState < ' a , ' tcx , Trans > {
412
410
fn empty ( input : & ' a Input ,
413
411
session : & ' tcx Session ,
414
412
out_dir : & ' a Option < PathBuf > )
@@ -525,7 +523,7 @@ impl<'a, 'tcx> CompileState<'a, 'tcx> {
525
523
session : & ' tcx Session ,
526
524
out_dir : & ' a Option < PathBuf > ,
527
525
out_file : & ' a Option < PathBuf > ,
528
- trans : & ' a trans :: CrateTranslation )
526
+ trans : & ' a < Trans as TransCrate > :: TranslatedCrate )
529
527
-> Self {
530
528
CompileState {
531
529
trans : Some ( trans) ,
0 commit comments