about summary refs log tree commit diff
path: root/compiler/rustc_save_analysis/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-30 16:54:42 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-09-05 14:20:25 +1000
commitbb0ae3c446e21002324f030efdfcdd80d1242450 (patch)
treede506ce34112c7d441812344bb3d2793ae4a529a /compiler/rustc_save_analysis/src
parent6d850d936bae9745b68b08c6e1d62a1b1cc6bc84 (diff)
downloadrust-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.rs5
-rw-r--r--compiler/rustc_save_analysis/src/lib.rs2
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(