1
Fork 0

Make hir::PathSegment::hir_id non-optional.

This commit is contained in:
Nicholas Nethercote 2022-08-30 16:54:42 +10:00
parent 6d850d936b
commit bb0ae3c446
16 changed files with 103 additions and 97 deletions

View file

@ -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)

View file

@ -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(