Make hir::PathSegment::hir_id non-optional.
This commit is contained in:
@@ -1260,6 +1260,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
return self.lower_path_ty(t, qself, path, ParamMode::Explicit, itctx);
|
||||
}
|
||||
TyKind::ImplicitSelf => {
|
||||
let hir_id = self.lower_node_id(t.id);
|
||||
let res = self.expect_full_res(t.id);
|
||||
let res = self.lower_res(res);
|
||||
hir::TyKind::Path(hir::QPath::Resolved(
|
||||
@@ -1268,6 +1269,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
res,
|
||||
segments: arena_vec![self; hir::PathSegment::from_ident(
|
||||
Ident::with_dummy_span(kw::SelfUpper),
|
||||
hir_id,
|
||||
res
|
||||
)],
|
||||
span: self.lower_span(t.span),
|
||||
@@ -2194,13 +2196,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
hir::PredicateOrigin::ImplTrait,
|
||||
);
|
||||
|
||||
let hir_id = self.next_id();
|
||||
let res = Res::Def(DefKind::TyParam, def_id.to_def_id());
|
||||
let ty = hir::TyKind::Path(hir::QPath::Resolved(
|
||||
None,
|
||||
self.arena.alloc(hir::Path {
|
||||
span: self.lower_span(span),
|
||||
res,
|
||||
segments: arena_vec![self; hir::PathSegment::from_ident(self.lower_ident(ident), res)],
|
||||
segments: arena_vec![self; hir::PathSegment::from_ident(self.lower_ident(ident), hir_id, res)],
|
||||
}),
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user