Auto merge of #136751 - bjorn3:update_rustfmt, r=Mark-Simulacrum
Update bootstrap compiler and rustfmt The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same time.
This commit is contained in:
commit
124cc92199
289 changed files with 6351 additions and 5071 deletions
|
@ -344,8 +344,12 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
}
|
||||
|
||||
fn inline_attr_str_error_without_macro_def(&self, hir_id: HirId, attr: &Attribute, sym: &str) {
|
||||
self.tcx
|
||||
.emit_node_span_lint(UNUSED_ATTRIBUTES, hir_id, attr.span, errors::IgnoredAttr { sym });
|
||||
self.tcx.emit_node_span_lint(
|
||||
UNUSED_ATTRIBUTES,
|
||||
hir_id,
|
||||
attr.span,
|
||||
errors::IgnoredAttr { sym },
|
||||
);
|
||||
}
|
||||
|
||||
/// Checks if `#[diagnostic::do_not_recommend]` is applied on a trait impl.
|
||||
|
@ -1505,10 +1509,12 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
_ => {
|
||||
// FIXME: #[cold] was previously allowed on non-functions and some crates used
|
||||
// this, so only emit a warning.
|
||||
self.tcx.emit_node_span_lint(UNUSED_ATTRIBUTES, hir_id, attr.span, errors::Cold {
|
||||
span,
|
||||
on_crate: hir_id == CRATE_HIR_ID,
|
||||
});
|
||||
self.tcx.emit_node_span_lint(
|
||||
UNUSED_ATTRIBUTES,
|
||||
hir_id,
|
||||
attr.span,
|
||||
errors::Cold { span, on_crate: hir_id == CRATE_HIR_ID },
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1523,9 +1529,12 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
return;
|
||||
}
|
||||
|
||||
self.tcx.emit_node_span_lint(UNUSED_ATTRIBUTES, hir_id, attr.span, errors::Link {
|
||||
span: (target != Target::ForeignMod).then_some(span),
|
||||
});
|
||||
self.tcx.emit_node_span_lint(
|
||||
UNUSED_ATTRIBUTES,
|
||||
hir_id,
|
||||
attr.span,
|
||||
errors::Link { span: (target != Target::ForeignMod).then_some(span) },
|
||||
);
|
||||
}
|
||||
|
||||
/// Checks if `#[link_name]` is applied to an item other than a foreign function or static.
|
||||
|
@ -2392,10 +2401,12 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
return;
|
||||
};
|
||||
|
||||
self.tcx.emit_node_span_lint(UNUSED_ATTRIBUTES, hir_id, attr.span, errors::Unused {
|
||||
attr_span: attr.span,
|
||||
note,
|
||||
});
|
||||
self.tcx.emit_node_span_lint(
|
||||
UNUSED_ATTRIBUTES,
|
||||
hir_id,
|
||||
attr.span,
|
||||
errors::Unused { attr_span: attr.span, note },
|
||||
);
|
||||
}
|
||||
|
||||
/// A best effort attempt to create an error for a mismatching proc macro signature.
|
||||
|
|
|
@ -1394,11 +1394,15 @@ pub(crate) struct DuplicateLangItem {
|
|||
impl<G: EmissionGuarantee> Diagnostic<'_, G> for DuplicateLangItem {
|
||||
#[track_caller]
|
||||
fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> {
|
||||
let mut diag = Diag::new(dcx, level, match self.duplicate {
|
||||
Duplicate::Plain => fluent::passes_duplicate_lang_item,
|
||||
Duplicate::Crate => fluent::passes_duplicate_lang_item_crate,
|
||||
Duplicate::CrateDepends => fluent::passes_duplicate_lang_item_crate_depends,
|
||||
});
|
||||
let mut diag = Diag::new(
|
||||
dcx,
|
||||
level,
|
||||
match self.duplicate {
|
||||
Duplicate::Plain => fluent::passes_duplicate_lang_item,
|
||||
Duplicate::Crate => fluent::passes_duplicate_lang_item_crate,
|
||||
Duplicate::CrateDepends => fluent::passes_duplicate_lang_item_crate_depends,
|
||||
},
|
||||
);
|
||||
diag.code(E0152);
|
||||
diag.arg("lang_item_name", self.lang_item_name);
|
||||
diag.arg("crate_name", self.crate_name);
|
||||
|
|
|
@ -230,24 +230,27 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_item(&mut self, i: &'v hir::Item<'v>) {
|
||||
record_variants!((self, i, i.kind, Some(i.hir_id()), hir, Item, ItemKind), [
|
||||
ExternCrate,
|
||||
Use,
|
||||
Static,
|
||||
Const,
|
||||
Fn,
|
||||
Macro,
|
||||
Mod,
|
||||
ForeignMod,
|
||||
GlobalAsm,
|
||||
TyAlias,
|
||||
Enum,
|
||||
Struct,
|
||||
Union,
|
||||
Trait,
|
||||
TraitAlias,
|
||||
Impl
|
||||
]);
|
||||
record_variants!(
|
||||
(self, i, i.kind, Some(i.hir_id()), hir, Item, ItemKind),
|
||||
[
|
||||
ExternCrate,
|
||||
Use,
|
||||
Static,
|
||||
Const,
|
||||
Fn,
|
||||
Macro,
|
||||
Mod,
|
||||
ForeignMod,
|
||||
GlobalAsm,
|
||||
TyAlias,
|
||||
Enum,
|
||||
Struct,
|
||||
Union,
|
||||
Trait,
|
||||
TraitAlias,
|
||||
Impl
|
||||
]
|
||||
);
|
||||
hir_visit::walk_item(self, i)
|
||||
}
|
||||
|
||||
|
@ -262,9 +265,10 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_foreign_item(&mut self, i: &'v hir::ForeignItem<'v>) {
|
||||
record_variants!((self, i, i.kind, Some(i.hir_id()), hir, ForeignItem, ForeignItemKind), [
|
||||
Fn, Static, Type
|
||||
]);
|
||||
record_variants!(
|
||||
(self, i, i.kind, Some(i.hir_id()), hir, ForeignItem, ForeignItemKind),
|
||||
[Fn, Static, Type]
|
||||
);
|
||||
hir_visit::walk_foreign_item(self, i)
|
||||
}
|
||||
|
||||
|
@ -279,9 +283,10 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_stmt(&mut self, s: &'v hir::Stmt<'v>) {
|
||||
record_variants!((self, s, s.kind, Some(s.hir_id), hir, Stmt, StmtKind), [
|
||||
Let, Item, Expr, Semi
|
||||
]);
|
||||
record_variants!(
|
||||
(self, s, s.kind, Some(s.hir_id), hir, Stmt, StmtKind),
|
||||
[Let, Item, Expr, Semi]
|
||||
);
|
||||
hir_visit::walk_stmt(self, s)
|
||||
}
|
||||
|
||||
|
@ -291,23 +296,26 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_pat(&mut self, p: &'v hir::Pat<'v>) {
|
||||
record_variants!((self, p, p.kind, Some(p.hir_id), hir, Pat, PatKind), [
|
||||
Wild,
|
||||
Binding,
|
||||
Struct,
|
||||
TupleStruct,
|
||||
Or,
|
||||
Never,
|
||||
Tuple,
|
||||
Box,
|
||||
Deref,
|
||||
Ref,
|
||||
Expr,
|
||||
Guard,
|
||||
Range,
|
||||
Slice,
|
||||
Err
|
||||
]);
|
||||
record_variants!(
|
||||
(self, p, p.kind, Some(p.hir_id), hir, Pat, PatKind),
|
||||
[
|
||||
Wild,
|
||||
Binding,
|
||||
Struct,
|
||||
TupleStruct,
|
||||
Or,
|
||||
Never,
|
||||
Tuple,
|
||||
Box,
|
||||
Deref,
|
||||
Ref,
|
||||
Expr,
|
||||
Guard,
|
||||
Range,
|
||||
Slice,
|
||||
Err
|
||||
]
|
||||
);
|
||||
hir_visit::walk_pat(self, p)
|
||||
}
|
||||
|
||||
|
@ -317,42 +325,45 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_expr(&mut self, e: &'v hir::Expr<'v>) {
|
||||
record_variants!((self, e, e.kind, Some(e.hir_id), hir, Expr, ExprKind), [
|
||||
ConstBlock,
|
||||
Array,
|
||||
Call,
|
||||
MethodCall,
|
||||
Tup,
|
||||
Binary,
|
||||
Unary,
|
||||
Lit,
|
||||
Cast,
|
||||
Type,
|
||||
DropTemps,
|
||||
Let,
|
||||
If,
|
||||
Loop,
|
||||
Match,
|
||||
Closure,
|
||||
Block,
|
||||
Assign,
|
||||
AssignOp,
|
||||
Field,
|
||||
Index,
|
||||
Path,
|
||||
AddrOf,
|
||||
Break,
|
||||
Continue,
|
||||
Ret,
|
||||
Become,
|
||||
InlineAsm,
|
||||
OffsetOf,
|
||||
Struct,
|
||||
Repeat,
|
||||
Yield,
|
||||
UnsafeBinderCast,
|
||||
Err
|
||||
]);
|
||||
record_variants!(
|
||||
(self, e, e.kind, Some(e.hir_id), hir, Expr, ExprKind),
|
||||
[
|
||||
ConstBlock,
|
||||
Array,
|
||||
Call,
|
||||
MethodCall,
|
||||
Tup,
|
||||
Binary,
|
||||
Unary,
|
||||
Lit,
|
||||
Cast,
|
||||
Type,
|
||||
DropTemps,
|
||||
Let,
|
||||
If,
|
||||
Loop,
|
||||
Match,
|
||||
Closure,
|
||||
Block,
|
||||
Assign,
|
||||
AssignOp,
|
||||
Field,
|
||||
Index,
|
||||
Path,
|
||||
AddrOf,
|
||||
Break,
|
||||
Continue,
|
||||
Ret,
|
||||
Become,
|
||||
InlineAsm,
|
||||
OffsetOf,
|
||||
Struct,
|
||||
Repeat,
|
||||
Yield,
|
||||
UnsafeBinderCast,
|
||||
Err
|
||||
]
|
||||
);
|
||||
hir_visit::walk_expr(self, e)
|
||||
}
|
||||
|
||||
|
@ -362,25 +373,28 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_ty(&mut self, t: &'v hir::Ty<'v, AmbigArg>) {
|
||||
record_variants!((self, t, t.kind, Some(t.hir_id), hir, Ty, TyKind), [
|
||||
InferDelegation,
|
||||
Slice,
|
||||
Array,
|
||||
Ptr,
|
||||
Ref,
|
||||
BareFn,
|
||||
UnsafeBinder,
|
||||
Never,
|
||||
Tup,
|
||||
Path,
|
||||
OpaqueDef,
|
||||
TraitAscription,
|
||||
TraitObject,
|
||||
Typeof,
|
||||
Infer,
|
||||
Pat,
|
||||
Err
|
||||
]);
|
||||
record_variants!(
|
||||
(self, t, t.kind, Some(t.hir_id), hir, Ty, TyKind),
|
||||
[
|
||||
InferDelegation,
|
||||
Slice,
|
||||
Array,
|
||||
Ptr,
|
||||
Ref,
|
||||
BareFn,
|
||||
UnsafeBinder,
|
||||
Never,
|
||||
Tup,
|
||||
Path,
|
||||
OpaqueDef,
|
||||
TraitAscription,
|
||||
TraitObject,
|
||||
Typeof,
|
||||
Infer,
|
||||
Pat,
|
||||
Err
|
||||
]
|
||||
);
|
||||
hir_visit::walk_ty(self, t)
|
||||
}
|
||||
|
||||
|
@ -421,9 +435,10 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_trait_item(&mut self, ti: &'v hir::TraitItem<'v>) {
|
||||
record_variants!((self, ti, ti.kind, Some(ti.hir_id()), hir, TraitItem, TraitItemKind), [
|
||||
Const, Fn, Type
|
||||
]);
|
||||
record_variants!(
|
||||
(self, ti, ti.kind, Some(ti.hir_id()), hir, TraitItem, TraitItemKind),
|
||||
[Const, Fn, Type]
|
||||
);
|
||||
hir_visit::walk_trait_item(self, ti)
|
||||
}
|
||||
|
||||
|
@ -433,9 +448,10 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_impl_item(&mut self, ii: &'v hir::ImplItem<'v>) {
|
||||
record_variants!((self, ii, ii.kind, Some(ii.hir_id()), hir, ImplItem, ImplItemKind), [
|
||||
Const, Fn, Type
|
||||
]);
|
||||
record_variants!(
|
||||
(self, ii, ii.kind, Some(ii.hir_id()), hir, ImplItem, ImplItemKind),
|
||||
[Const, Fn, Type]
|
||||
);
|
||||
hir_visit::walk_impl_item(self, ii)
|
||||
}
|
||||
|
||||
|
@ -450,9 +466,10 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_param_bound(&mut self, b: &'v hir::GenericBound<'v>) {
|
||||
record_variants!((self, b, b, None, hir, GenericBound, GenericBound), [
|
||||
Trait, Outlives, Use
|
||||
]);
|
||||
record_variants!(
|
||||
(self, b, b, None, hir, GenericBound, GenericBound),
|
||||
[Trait, Outlives, Use]
|
||||
);
|
||||
hir_visit::walk_param_bound(self, b)
|
||||
}
|
||||
|
||||
|
@ -467,9 +484,10 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_generic_arg(&mut self, ga: &'v hir::GenericArg<'v>) {
|
||||
record_variants!((self, ga, ga, Some(ga.hir_id()), hir, GenericArg, GenericArg), [
|
||||
Lifetime, Type, Const, Infer
|
||||
]);
|
||||
record_variants!(
|
||||
(self, ga, ga, Some(ga.hir_id()), hir, GenericArg, GenericArg),
|
||||
[Lifetime, Type, Const, Infer]
|
||||
);
|
||||
match ga {
|
||||
hir::GenericArg::Lifetime(lt) => self.visit_lifetime(lt),
|
||||
hir::GenericArg::Type(ty) => self.visit_ty(ty),
|
||||
|
@ -515,34 +533,38 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
|
||||
impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
||||
fn visit_foreign_item(&mut self, i: &'v ast::ForeignItem) {
|
||||
record_variants!((self, i, i.kind, None, ast, ForeignItem, ForeignItemKind), [
|
||||
Static, Fn, TyAlias, MacCall
|
||||
]);
|
||||
record_variants!(
|
||||
(self, i, i.kind, None, ast, ForeignItem, ForeignItemKind),
|
||||
[Static, Fn, TyAlias, MacCall]
|
||||
);
|
||||
ast_visit::walk_item(self, i)
|
||||
}
|
||||
|
||||
fn visit_item(&mut self, i: &'v ast::Item) {
|
||||
record_variants!((self, i, i.kind, None, ast, Item, ItemKind), [
|
||||
ExternCrate,
|
||||
Use,
|
||||
Static,
|
||||
Const,
|
||||
Fn,
|
||||
Mod,
|
||||
ForeignMod,
|
||||
GlobalAsm,
|
||||
TyAlias,
|
||||
Enum,
|
||||
Struct,
|
||||
Union,
|
||||
Trait,
|
||||
TraitAlias,
|
||||
Impl,
|
||||
MacCall,
|
||||
MacroDef,
|
||||
Delegation,
|
||||
DelegationMac
|
||||
]);
|
||||
record_variants!(
|
||||
(self, i, i.kind, None, ast, Item, ItemKind),
|
||||
[
|
||||
ExternCrate,
|
||||
Use,
|
||||
Static,
|
||||
Const,
|
||||
Fn,
|
||||
Mod,
|
||||
ForeignMod,
|
||||
GlobalAsm,
|
||||
TyAlias,
|
||||
Enum,
|
||||
Struct,
|
||||
Union,
|
||||
Trait,
|
||||
TraitAlias,
|
||||
Impl,
|
||||
MacCall,
|
||||
MacroDef,
|
||||
Delegation,
|
||||
DelegationMac
|
||||
]
|
||||
);
|
||||
ast_visit::walk_item(self, i)
|
||||
}
|
||||
|
||||
|
@ -557,9 +579,10 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_stmt(&mut self, s: &'v ast::Stmt) {
|
||||
record_variants!((self, s, s.kind, None, ast, Stmt, StmtKind), [
|
||||
Let, Item, Expr, Semi, Empty, MacCall
|
||||
]);
|
||||
record_variants!(
|
||||
(self, s, s.kind, None, ast, Stmt, StmtKind),
|
||||
[Let, Item, Expr, Semi, Empty, MacCall]
|
||||
);
|
||||
ast_visit::walk_stmt(self, s)
|
||||
}
|
||||
|
||||
|
@ -574,27 +597,30 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_pat(&mut self, p: &'v ast::Pat) {
|
||||
record_variants!((self, p, p.kind, None, ast, Pat, PatKind), [
|
||||
Wild,
|
||||
Ident,
|
||||
Struct,
|
||||
TupleStruct,
|
||||
Or,
|
||||
Path,
|
||||
Tuple,
|
||||
Box,
|
||||
Deref,
|
||||
Ref,
|
||||
Expr,
|
||||
Range,
|
||||
Slice,
|
||||
Rest,
|
||||
Never,
|
||||
Guard,
|
||||
Paren,
|
||||
MacCall,
|
||||
Err
|
||||
]);
|
||||
record_variants!(
|
||||
(self, p, p.kind, None, ast, Pat, PatKind),
|
||||
[
|
||||
Wild,
|
||||
Ident,
|
||||
Struct,
|
||||
TupleStruct,
|
||||
Or,
|
||||
Path,
|
||||
Tuple,
|
||||
Box,
|
||||
Deref,
|
||||
Ref,
|
||||
Expr,
|
||||
Range,
|
||||
Slice,
|
||||
Rest,
|
||||
Never,
|
||||
Guard,
|
||||
Paren,
|
||||
MacCall,
|
||||
Err
|
||||
]
|
||||
);
|
||||
ast_visit::walk_pat(self, p)
|
||||
}
|
||||
|
||||
|
@ -614,29 +640,32 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_ty(&mut self, t: &'v ast::Ty) {
|
||||
record_variants!((self, t, t.kind, None, ast, Ty, TyKind), [
|
||||
Slice,
|
||||
Array,
|
||||
Ptr,
|
||||
Ref,
|
||||
PinnedRef,
|
||||
BareFn,
|
||||
UnsafeBinder,
|
||||
Never,
|
||||
Tup,
|
||||
Path,
|
||||
Pat,
|
||||
TraitObject,
|
||||
ImplTrait,
|
||||
Paren,
|
||||
Typeof,
|
||||
Infer,
|
||||
ImplicitSelf,
|
||||
MacCall,
|
||||
CVarArgs,
|
||||
Dummy,
|
||||
Err
|
||||
]);
|
||||
record_variants!(
|
||||
(self, t, t.kind, None, ast, Ty, TyKind),
|
||||
[
|
||||
Slice,
|
||||
Array,
|
||||
Ptr,
|
||||
Ref,
|
||||
PinnedRef,
|
||||
BareFn,
|
||||
UnsafeBinder,
|
||||
Never,
|
||||
Tup,
|
||||
Path,
|
||||
Pat,
|
||||
TraitObject,
|
||||
ImplTrait,
|
||||
Paren,
|
||||
Typeof,
|
||||
Infer,
|
||||
ImplicitSelf,
|
||||
MacCall,
|
||||
CVarArgs,
|
||||
Dummy,
|
||||
Err
|
||||
]
|
||||
);
|
||||
|
||||
ast_visit::walk_ty(self, t)
|
||||
}
|
||||
|
@ -647,11 +676,10 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_where_predicate(&mut self, p: &'v ast::WherePredicate) {
|
||||
record_variants!((self, p, &p.kind, None, ast, WherePredicate, WherePredicateKind), [
|
||||
BoundPredicate,
|
||||
RegionPredicate,
|
||||
EqPredicate
|
||||
]);
|
||||
record_variants!(
|
||||
(self, p, &p.kind, None, ast, WherePredicate, WherePredicateKind),
|
||||
[BoundPredicate, RegionPredicate, EqPredicate]
|
||||
);
|
||||
ast_visit::walk_where_predicate(self, p)
|
||||
}
|
||||
|
||||
|
@ -661,21 +689,18 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_assoc_item(&mut self, i: &'v ast::AssocItem, ctxt: ast_visit::AssocCtxt) {
|
||||
record_variants!((self, i, i.kind, None, ast, AssocItem, AssocItemKind), [
|
||||
Const,
|
||||
Fn,
|
||||
Type,
|
||||
MacCall,
|
||||
Delegation,
|
||||
DelegationMac
|
||||
]);
|
||||
record_variants!(
|
||||
(self, i, i.kind, None, ast, AssocItem, AssocItemKind),
|
||||
[Const, Fn, Type, MacCall, Delegation, DelegationMac]
|
||||
);
|
||||
ast_visit::walk_assoc_item(self, i, ctxt);
|
||||
}
|
||||
|
||||
fn visit_param_bound(&mut self, b: &'v ast::GenericBound, _ctxt: BoundKind) {
|
||||
record_variants!((self, b, b, None, ast, GenericBound, GenericBound), [
|
||||
Trait, Outlives, Use
|
||||
]);
|
||||
record_variants!(
|
||||
(self, b, b, None, ast, GenericBound, GenericBound),
|
||||
[Trait, Outlives, Use]
|
||||
);
|
||||
ast_visit::walk_param_bound(self, b)
|
||||
}
|
||||
|
||||
|
@ -708,18 +733,18 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
// common, so we implement `visit_generic_args` and tolerate the double
|
||||
// counting in the former case.
|
||||
fn visit_generic_args(&mut self, g: &'v ast::GenericArgs) {
|
||||
record_variants!((self, g, g, None, ast, GenericArgs, GenericArgs), [
|
||||
AngleBracketed,
|
||||
Parenthesized,
|
||||
ParenthesizedElided
|
||||
]);
|
||||
record_variants!(
|
||||
(self, g, g, None, ast, GenericArgs, GenericArgs),
|
||||
[AngleBracketed, Parenthesized, ParenthesizedElided]
|
||||
);
|
||||
ast_visit::walk_generic_args(self, g)
|
||||
}
|
||||
|
||||
fn visit_attribute(&mut self, attr: &'v ast::Attribute) {
|
||||
record_variants!((self, attr, attr.kind, None, ast, Attribute, AttrKind), [
|
||||
Normal, DocComment
|
||||
]);
|
||||
record_variants!(
|
||||
(self, attr, attr.kind, None, ast, Attribute, AttrKind),
|
||||
[Normal, DocComment]
|
||||
);
|
||||
ast_visit::walk_attribute(self, attr)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue