Move some Map methods onto TyCtxt.
The end goal is to eliminate `Map` altogether. I added a `hir_` prefix to all of them, that seemed simplest. The exceptions are `module_items` which became `hir_module_free_items` because there was already a `hir_module_items`, and `items` which became `hir_free_items` for consistency with `hir_module_free_items`.
This commit is contained in:
@@ -273,7 +273,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
|
||||
let attrs = |id| hir_map.attrs(id);
|
||||
pprust_hir::print_crate(
|
||||
sm,
|
||||
hir_map.root_module(),
|
||||
tcx.hir_root_module(),
|
||||
src_name,
|
||||
src,
|
||||
&attrs,
|
||||
@@ -294,7 +294,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
|
||||
}
|
||||
HirTree => {
|
||||
debug!("pretty printing HIR tree");
|
||||
format!("{:#?}", ex.tcx().hir().krate())
|
||||
format!("{:#?}", ex.tcx().hir_krate())
|
||||
}
|
||||
Mir => {
|
||||
let mut out = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user