diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-11-27 18:01:40 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-09 19:09:36 +0100 |
| commit | fd8a0217571d00d028bb2878cc0df5c3686a300e (patch) | |
| tree | 366c72d89024f5bc7a8d0ac7ba27de729d742dbb | |
| parent | 7ea1eacb17f32b7cefc773e05cf770d4c3cea812 (diff) | |
| download | rust-fd8a0217571d00d028bb2878cc0df5c3686a300e.tar.gz rust-fd8a0217571d00d028bb2878cc0df5c3686a300e.zip | |
Remove hir::GenericParam::attrs.
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 1 |
2 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 653a3b3fda2..57a86a35063 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -841,7 +841,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { hir::GenericParam { hir_id: self.lower_node_id(node_id), name: hir_name, - attrs: &[], bounds: &[], span, pure_wrt_drop: false, @@ -1453,7 +1452,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { hir_id: self.lower_node_id(def_node_id), name: ParamName::Plain(ident), pure_wrt_drop: false, - attrs: &[], bounds: hir_bounds, span, kind: hir::GenericParamKind::Type { @@ -1742,7 +1740,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { name, span: lifetime.span, pure_wrt_drop: false, - attrs: &[], bounds: &[], kind: hir::GenericParamKind::Lifetime { kind }, }); @@ -2311,12 +2308,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { }; let hir_id = self.lower_node_id(param.id); + self.lower_attrs(hir_id, ¶m.attrs); hir::GenericParam { hir_id, name, span: param.ident.span, pure_wrt_drop: self.sess.contains_name(¶m.attrs, sym::may_dangle), - attrs: self.lower_attrs(hir_id, ¶m.attrs), bounds: self.arena.alloc_from_iter(bounds), kind, } diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index ed7a1415c2a..6e51c41601c 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -469,7 +469,6 @@ pub enum GenericParamKind<'hir> { pub struct GenericParam<'hir> { pub hir_id: HirId, pub name: ParamName, - pub attrs: &'hir [Attribute], pub bounds: GenericBounds<'hir>, pub span: Span, pub pure_wrt_drop: bool, |
