diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-30 16:54:42 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-09-05 14:20:25 +1000 |
| commit | bb0ae3c446e21002324f030efdfcdd80d1242450 (patch) | |
| tree | de506ce34112c7d441812344bb3d2793ae4a529a /compiler/rustc_save_analysis/src | |
| parent | 6d850d936bae9745b68b08c6e1d62a1b1cc6bc84 (diff) | |
| download | rust-bb0ae3c446e21002324f030efdfcdd80d1242450.tar.gz rust-bb0ae3c446e21002324f030efdfcdd80d1242450.zip | |
Make `hir::PathSegment::hir_id` non-optional.
Diffstat (limited to 'compiler/rustc_save_analysis/src')
| -rw-r--r-- | compiler/rustc_save_analysis/src/dump_visitor.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_save_analysis/src/lib.rs | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_save_analysis/src/dump_visitor.rs b/compiler/rustc_save_analysis/src/dump_visitor.rs index 769d3243d58..f2b2daaf20b 100644 --- a/compiler/rustc_save_analysis/src/dump_visitor.rs +++ b/compiler/rustc_save_analysis/src/dump_visitor.rs @@ -912,7 +912,10 @@ impl<'tcx> DumpVisitor<'tcx> { _, ) | Res::SelfTy { .. } => { - self.dump_path_segment_ref(id, &hir::PathSegment::from_ident(ident, Res::Err)); + self.dump_path_segment_ref( + id, + &hir::PathSegment::from_ident(ident, hir::HirId::INVALID, Res::Err), + ); } def => { error!("unexpected definition kind when processing collected idents: {:?}", def) diff --git a/compiler/rustc_save_analysis/src/lib.rs b/compiler/rustc_save_analysis/src/lib.rs index 4b110b824e0..c58ccde4390 100644 --- a/compiler/rustc_save_analysis/src/lib.rs +++ b/compiler/rustc_save_analysis/src/lib.rs @@ -649,7 +649,7 @@ impl<'tcx> SaveContext<'tcx> { } pub fn get_path_segment_data(&self, path_seg: &hir::PathSegment<'_>) -> Option<Ref> { - self.get_path_segment_data_with_id(path_seg, path_seg.hir_id?) + self.get_path_segment_data_with_id(path_seg, path_seg.hir_id) } pub fn get_path_segment_data_with_id( |
