Make hir::PathSegment::res non-optional.
This commit is contained in:
@@ -1267,7 +1267,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
self.arena.alloc(hir::Path {
|
||||
res,
|
||||
segments: arena_vec![self; hir::PathSegment::from_ident(
|
||||
Ident::with_dummy_span(kw::SelfUpper)
|
||||
Ident::with_dummy_span(kw::SelfUpper),
|
||||
res
|
||||
)],
|
||||
span: self.lower_span(t.span),
|
||||
}),
|
||||
@@ -2193,12 +2194,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
hir::PredicateOrigin::ImplTrait,
|
||||
);
|
||||
|
||||
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: Res::Def(DefKind::TyParam, def_id.to_def_id()),
|
||||
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), res)],
|
||||
}),
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user