Remove hir::Param::attrs.
This commit is contained in:
parent
96788df68c
commit
a0a4611a81
4 changed files with 3 additions and 5 deletions
|
@ -663,7 +663,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
||||||
Ident::with_dummy_span(sym::_task_context),
|
Ident::with_dummy_span(sym::_task_context),
|
||||||
hir::BindingAnnotation::Mutable,
|
hir::BindingAnnotation::Mutable,
|
||||||
);
|
);
|
||||||
let param = hir::Param { attrs: &[], hir_id: self.next_id(), pat, ty_span: span, span };
|
let param = hir::Param { hir_id: self.next_id(), pat, ty_span: span, span };
|
||||||
let params = arena_vec![self; param];
|
let params = arena_vec![self; param];
|
||||||
|
|
||||||
let body_id = self.lower_body(move |this| {
|
let body_id = self.lower_body(move |this| {
|
||||||
|
|
|
@ -1042,9 +1042,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
||||||
|
|
||||||
fn lower_param(&mut self, param: &Param) -> hir::Param<'hir> {
|
fn lower_param(&mut self, param: &Param) -> hir::Param<'hir> {
|
||||||
let hir_id = self.lower_node_id(param.id);
|
let hir_id = self.lower_node_id(param.id);
|
||||||
|
self.lower_attrs(hir_id, ¶m.attrs);
|
||||||
hir::Param {
|
hir::Param {
|
||||||
hir_id,
|
hir_id,
|
||||||
attrs: self.lower_attrs(hir_id, ¶m.attrs),
|
|
||||||
pat: self.lower_pat(¶m.pat),
|
pat: self.lower_pat(¶m.pat),
|
||||||
ty_span: param.ty.span,
|
ty_span: param.ty.span,
|
||||||
span: param.span,
|
span: param.span,
|
||||||
|
@ -1179,7 +1179,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
||||||
let stmt_attrs = this.attrs[parameter.hir_id];
|
let stmt_attrs = this.attrs[parameter.hir_id];
|
||||||
let (new_parameter_pat, new_parameter_id) = this.pat_ident(desugared_span, ident);
|
let (new_parameter_pat, new_parameter_id) = this.pat_ident(desugared_span, ident);
|
||||||
let new_parameter = hir::Param {
|
let new_parameter = hir::Param {
|
||||||
attrs: parameter.attrs,
|
|
||||||
hir_id: parameter.hir_id,
|
hir_id: parameter.hir_id,
|
||||||
pat: new_parameter_pat,
|
pat: new_parameter_pat,
|
||||||
ty_span: parameter.ty_span,
|
ty_span: parameter.ty_span,
|
||||||
|
|
|
@ -2421,7 +2421,6 @@ pub struct LlvmInlineAsm<'hir> {
|
||||||
/// Represents a parameter in a function header.
|
/// Represents a parameter in a function header.
|
||||||
#[derive(Debug, HashStable_Generic)]
|
#[derive(Debug, HashStable_Generic)]
|
||||||
pub struct Param<'hir> {
|
pub struct Param<'hir> {
|
||||||
pub attrs: &'hir [Attribute],
|
|
||||||
pub hir_id: HirId,
|
pub hir_id: HirId,
|
||||||
pub pat: &'hir Pat<'hir>,
|
pub pat: &'hir Pat<'hir>,
|
||||||
pub ty_span: Span,
|
pub ty_span: Span,
|
||||||
|
|
|
@ -2032,7 +2032,7 @@ impl<'a> State<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn print_param(&mut self, arg: &hir::Param<'_>) {
|
pub fn print_param(&mut self, arg: &hir::Param<'_>) {
|
||||||
self.print_outer_attributes(&arg.attrs);
|
self.print_outer_attributes(self.attrs(arg.hir_id));
|
||||||
self.print_pat(&arg.pat);
|
self.print_pat(&arg.pat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue