Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=Zoxc

The (almost) culmination of HirIdification

It's finally over.

This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name.
All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
This commit is contained in:
Mazdak Farrokhzad 2019-07-05 20:26:56 +02:00 committed by GitHub
commit 2e86c006f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 309 additions and 321 deletions

View file

@ -465,7 +465,7 @@ impl<'b, 'tcx> HirPrinterSupport<'tcx> for TypedAnnotation<'b, 'tcx> {
}
fn node_path(&self, id: hir::HirId) -> Option<String> {
Some(self.tcx.def_path_str(self.tcx.hir().local_def_id_from_hir_id(id)))
Some(self.tcx.def_path_str(self.tcx.hir().local_def_id(id)))
}
}
@ -877,7 +877,7 @@ fn print_with_analysis(
let mut print = || match ppm {
PpmMir | PpmMirCFG => {
if let Some(nodeid) = nodeid {
let def_id = tcx.hir().local_def_id(nodeid);
let def_id = tcx.hir().local_def_id_from_node_id(nodeid);
match ppm {
PpmMir => write_mir_pretty(tcx, Some(def_id), &mut out),
PpmMirCFG => write_mir_graphviz(tcx, Some(def_id), &mut out),