Skip to content

Commit fd8a021

Browse files
committed
Remove hir::GenericParam::attrs.
1 parent 7ea1eac commit fd8a021

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
841841
hir::GenericParam {
842842
hir_id: self.lower_node_id(node_id),
843843
name: hir_name,
844-
attrs: &[],
845844
bounds: &[],
846845
span,
847846
pure_wrt_drop: false,
@@ -1453,7 +1452,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14531452
hir_id: self.lower_node_id(def_node_id),
14541453
name: ParamName::Plain(ident),
14551454
pure_wrt_drop: false,
1456-
attrs: &[],
14571455
bounds: hir_bounds,
14581456
span,
14591457
kind: hir::GenericParamKind::Type {
@@ -1742,7 +1740,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
17421740
name,
17431741
span: lifetime.span,
17441742
pure_wrt_drop: false,
1745-
attrs: &[],
17461743
bounds: &[],
17471744
kind: hir::GenericParamKind::Lifetime { kind },
17481745
});
@@ -2311,12 +2308,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
23112308
};
23122309

23132310
let hir_id = self.lower_node_id(param.id);
2311+
self.lower_attrs(hir_id, &param.attrs);
23142312
hir::GenericParam {
23152313
hir_id,
23162314
name,
23172315
span: param.ident.span,
23182316
pure_wrt_drop: self.sess.contains_name(&param.attrs, sym::may_dangle),
2319-
attrs: self.lower_attrs(hir_id, &param.attrs),
23202317
bounds: self.arena.alloc_from_iter(bounds),
23212318
kind,
23222319
}

compiler/rustc_hir/src/hir.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@ pub enum GenericParamKind<'hir> {
469469
pub struct GenericParam<'hir> {
470470
pub hir_id: HirId,
471471
pub name: ParamName,
472-
pub attrs: &'hir [Attribute],
473472
pub bounds: GenericBounds<'hir>,
474473
pub span: Span,
475474
pub pure_wrt_drop: bool,

0 commit comments

Comments
 (0)