diff options
| author | Igor Matuszewski <Xanewok@gmail.com> | 2019-01-06 01:22:52 +0100 |
|---|---|---|
| committer | Igor Matuszewski <Xanewok@gmail.com> | 2019-01-13 10:42:59 +0100 |
| commit | df9df19507ea4573ff141d253b2e95cd5b6cd0ff (patch) | |
| tree | 9a8676d87faacb301c696229774b4c72c703115c /src/librustc_save_analysis | |
| parent | 75a369c5b11459baa6bf7734eeb6135998a0a7de (diff) | |
| download | rust-df9df19507ea4573ff141d253b2e95cd5b6cd0ff.tar.gz rust-df9df19507ea4573ff141d253b2e95cd5b6cd0ff.zip | |
Always calculate glob map but only for glob uses
Previously calculating glob map was *opt-in*, however it did record node id -> ident use for every use directive. This aims to see if we can unconditionally calculate the glob map and not regress performance.
Diffstat (limited to 'src/librustc_save_analysis')
| -rw-r--r-- | src/librustc_save_analysis/dump_visitor.rs | 1 | ||||
| -rw-r--r-- | src/librustc_save_analysis/lib.rs | 2 |
2 files changed, 0 insertions, 3 deletions
diff --git a/src/librustc_save_analysis/dump_visitor.rs b/src/librustc_save_analysis/dump_visitor.rs index 89153730917..52be67fb512 100644 --- a/src/librustc_save_analysis/dump_visitor.rs +++ b/src/librustc_save_analysis/dump_visitor.rs @@ -1239,7 +1239,6 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> { // Make a comma-separated list of names of imported modules. let glob_map = &self.save_ctxt.analysis.glob_map; - let glob_map = glob_map.as_ref().unwrap(); let names = if glob_map.contains_key(&id) { glob_map.get(&id).unwrap().iter().map(|n| n.to_string()).collect() } else { diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index d5b3070372b..4b0fb686ba5 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -1122,8 +1122,6 @@ pub fn process_crate<'l, 'tcx, H: SaveHandler>( mut handler: H, ) { tcx.dep_graph.with_ignore(|| { - assert!(analysis.glob_map.is_some()); - info!("Dumping crate {}", cratename); let save_ctxt = SaveContext { |
