diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-05 20:26:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-05 20:26:56 +0200 |
| commit | 2e86c006f73c6facd38bf82ffd502dcff3864c28 (patch) | |
| tree | 288c6e7eabb239910746a930301c0ba5653cea48 /src/librustc_driver | |
| parent | b41a62ef69ef6886f4a7c59fc2cdc2cc44608936 (diff) | |
| parent | a6030ff699e24a2d8f09bfd833361f119a9f0633 (diff) | |
| download | rust-2e86c006f73c6facd38bf82ffd502dcff3864c28.tar.gz rust-2e86c006f73c6facd38bf82ffd502dcff3864c28.zip | |
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`.
Diffstat (limited to 'src/librustc_driver')
| -rw-r--r-- | src/librustc_driver/pretty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs index 9f0e90e5214..f314af43f99 100644 --- a/src/librustc_driver/pretty.rs +++ b/src/librustc_driver/pretty.rs @@ -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), |
