address review comments + better tests
This commit is contained in:
@@ -2247,6 +2247,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
) -> (hir::GenericParam<'hir>, Option<hir::WherePredicate<'hir>>, hir::TyKind<'hir>) {
|
||||
// Add a definition for the in-band `Param`.
|
||||
let def_id = self.local_def_id(node_id);
|
||||
let span = self.lower_span(span);
|
||||
|
||||
// Set the name to `impl Bound1 + Bound2`.
|
||||
let param = hir::GenericParam {
|
||||
@@ -2254,7 +2255,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
def_id,
|
||||
name: ParamName::Plain(self.lower_ident(ident)),
|
||||
pure_wrt_drop: false,
|
||||
span: self.lower_span(span),
|
||||
span,
|
||||
kind: hir::GenericParamKind::Type { default: None, synthetic: true },
|
||||
colon_span: None,
|
||||
};
|
||||
@@ -2264,6 +2265,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
node_id,
|
||||
&GenericParamKind::Type { default: None },
|
||||
bounds,
|
||||
/* colon_span */ None,
|
||||
span,
|
||||
&ImplTraitContext::Universal,
|
||||
hir::PredicateOrigin::ImplTrait,
|
||||
);
|
||||
@@ -2273,7 +2276,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
let ty = hir::TyKind::Path(hir::QPath::Resolved(
|
||||
None,
|
||||
self.arena.alloc(hir::Path {
|
||||
span: self.lower_span(span),
|
||||
span,
|
||||
res,
|
||||
segments:
|
||||
arena_vec![self; hir::PathSegment::new(self.lower_ident(ident), hir_id, res)],
|
||||
|
||||
Reference in New Issue
Block a user