Store a LocalDefId in hir::GenericParam.
This commit is contained in:
@@ -830,8 +830,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
),
|
||||
};
|
||||
let hir_id = self.lower_node_id(node_id);
|
||||
let def_id = self.local_def_id(node_id);
|
||||
Some(hir::GenericParam {
|
||||
hir_id,
|
||||
def_id,
|
||||
name,
|
||||
span: self.lower_span(ident.span),
|
||||
pure_wrt_drop: false,
|
||||
@@ -1521,6 +1523,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
|
||||
hir::GenericParam {
|
||||
hir_id,
|
||||
def_id: lctx.local_def_id(new_node_id),
|
||||
name,
|
||||
span: lifetime.ident.span,
|
||||
pure_wrt_drop: false,
|
||||
@@ -1978,6 +1981,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
|
||||
hir::GenericParam {
|
||||
hir_id,
|
||||
def_id: this.local_def_id(new_node_id),
|
||||
name,
|
||||
span: lifetime.ident.span,
|
||||
pure_wrt_drop: false,
|
||||
@@ -2176,6 +2180,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
self.lower_attrs(hir_id, ¶m.attrs);
|
||||
hir::GenericParam {
|
||||
hir_id,
|
||||
def_id: self.local_def_id(param.id),
|
||||
name,
|
||||
span: self.lower_span(param.span()),
|
||||
pure_wrt_drop: self.tcx.sess.contains_name(¶m.attrs, sym::may_dangle),
|
||||
@@ -2280,6 +2285,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
// Set the name to `impl Bound1 + Bound2`.
|
||||
let param = hir::GenericParam {
|
||||
hir_id: self.lower_node_id(node_id),
|
||||
def_id,
|
||||
name: ParamName::Plain(self.lower_ident(ident)),
|
||||
pure_wrt_drop: false,
|
||||
span: self.lower_span(span),
|
||||
|
||||
Reference in New Issue
Block a user