Skip to content

Commit 6cd40d0

Browse files
committed
Remove attrs arg from typaram and mk_ty_param.
Because it's always empty.
1 parent 2c24958 commit 6cd40d0

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

compiler/rustc_builtin_macros/src/deriving/generic/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ impl<'a> TraitDef<'a> {
603603
param.bounds.iter().cloned()
604604
).collect();
605605

606-
cx.typaram(param.ident.span.with_ctxt(ctxt), param.ident, vec![], bounds, None)
606+
cx.typaram(param.ident.span.with_ctxt(ctxt), param.ident, bounds, None)
607607
}
608608
GenericParamKind::Const { ty, kw_span, .. } => {
609609
let const_nodefault_kind = GenericParamKind::Const {

compiler/rustc_builtin_macros/src/deriving/generic/ty.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ fn mk_ty_param(
146146
cx: &ExtCtxt<'_>,
147147
span: Span,
148148
name: Symbol,
149-
attrs: &[ast::Attribute],
150149
bounds: &[Path],
151150
self_ident: Ident,
152151
self_generics: &Generics,
@@ -158,7 +157,7 @@ fn mk_ty_param(
158157
cx.trait_bound(path)
159158
})
160159
.collect();
161-
cx.typaram(span, Ident::new(name, span), attrs.to_owned(), bounds, None)
160+
cx.typaram(span, Ident::new(name, span), bounds, None)
162161
}
163162

164163
/// Bounds on type parameters.
@@ -183,7 +182,7 @@ impl Bounds {
183182
.iter()
184183
.map(|t| {
185184
let (name, ref bounds) = *t;
186-
mk_ty_param(cx, span, name, &[], &bounds, self_ty, self_generics)
185+
mk_ty_param(cx, span, name, &bounds, self_ty, self_generics)
187186
})
188187
.collect();
189188

compiler/rustc_expand/src/build.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,13 @@ impl<'a> ExtCtxt<'a> {
106106
&self,
107107
span: Span,
108108
ident: Ident,
109-
attrs: Vec<ast::Attribute>,
110109
bounds: ast::GenericBounds,
111110
default: Option<P<ast::Ty>>,
112111
) -> ast::GenericParam {
113112
ast::GenericParam {
114113
ident: ident.with_span_pos(span),
115114
id: ast::DUMMY_NODE_ID,
116-
attrs: attrs.into(),
115+
attrs: AttrVec::new(),
117116
bounds,
118117
kind: ast::GenericParamKind::Type { default },
119118
is_placeholder: false,

0 commit comments

Comments
 (0)