1
Fork 0

Address review comments.

This commit is contained in:
Nicholas Nethercote 2022-09-01 08:44:20 +10:00
parent bb0ae3c446
commit 08a00eb0da
6 changed files with 9 additions and 10 deletions

View file

@ -1783,7 +1783,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
self.arena.alloc(hir::Path {
span: self.lower_span(span),
res,
segments: arena_vec![self; hir::PathSegment::from_ident(ident, hir_id, res)],
segments: arena_vec![self; hir::PathSegment::new(ident, hir_id, res)],
}),
));

View file

@ -1438,7 +1438,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
res,
segments: self
.arena
.alloc_from_iter([hir::PathSegment::from_ident(ident, hir_id, res)]),
.alloc_from_iter([hir::PathSegment::new(ident, hir_id, res)]),
});
let ty_id = self.next_id();
let bounded_ty =

View file

@ -1267,7 +1267,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
None,
self.arena.alloc(hir::Path {
res,
segments: arena_vec![self; hir::PathSegment::from_ident(
segments: arena_vec![self; hir::PathSegment::new(
Ident::with_dummy_span(kw::SelfUpper),
hir_id,
res
@ -2203,7 +2203,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
self.arena.alloc(hir::Path {
span: self.lower_span(span),
res,
segments: arena_vec![self; hir::PathSegment::from_ident(self.lower_ident(ident), hir_id, res)],
segments:
arena_vec![self; hir::PathSegment::new(self.lower_ident(ident), hir_id, res)],
}),
));

View file

@ -262,7 +262,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
self.arena.alloc(hir::Path {
span: self.lower_span(ident.span),
res,
segments: arena_vec![self; hir::PathSegment::from_ident(self.lower_ident(ident), hir_id, res)],
segments: arena_vec![self; hir::PathSegment::new(self.lower_ident(ident), hir_id, res)],
}),
))
}