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

@ -1776,13 +1776,14 @@ impl<'hir> LoweringContext<'_, 'hir> {
binding: hir::HirId,
attrs: AttrVec,
) -> hir::Expr<'hir> {
let hir_id = self.next_id();
let res = Res::Local(binding);
let expr_path = hir::ExprKind::Path(hir::QPath::Resolved(
None,
self.arena.alloc(hir::Path {
span: self.lower_span(span),
res,
segments: arena_vec![self; hir::PathSegment::from_ident(ident, res)],
segments: arena_vec![self; hir::PathSegment::from_ident(ident, hir_id, res)],
}),
));