mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2025-02-17 05:57:30 +00:00
Update generated code
This commit is contained in:
parent
0a8633a18f
commit
05ec24cdb4
@ -40,10 +40,6 @@ pub trait Fold {
|
||||
fold_angle_bracketed_generic_arguments(self, i)
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
fn fold_arg_typed(&mut self, i: ArgTyped) -> ArgTyped {
|
||||
fold_arg_typed(self, i)
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
fn fold_arm(&mut self, i: Arm) -> Arm {
|
||||
fold_arm(self, i)
|
||||
}
|
||||
@ -845,14 +841,6 @@ pub fn fold_angle_bracketed_generic_arguments<V: Fold + ?Sized>(
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
pub fn fold_arg_typed<V: Fold + ?Sized>(_visitor: &mut V, _i: ArgTyped) -> ArgTyped {
|
||||
ArgTyped {
|
||||
pat: _visitor.fold_pat(_i.pat),
|
||||
colon_token: Token ! [ : ](tokens_helper(_visitor, &_i.colon_token.spans)),
|
||||
ty: _visitor.fold_type(_i.ty),
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
pub fn fold_arm<V: Fold + ?Sized>(_visitor: &mut V, _i: Arm) -> Arm {
|
||||
Arm {
|
||||
attrs: FoldHelper::lift(_i.attrs, |it| _visitor.fold_attribute(it)),
|
||||
@ -1581,7 +1569,7 @@ pub fn fold_file<V: Fold + ?Sized>(_visitor: &mut V, _i: File) -> File {
|
||||
pub fn fold_fn_arg<V: Fold + ?Sized>(_visitor: &mut V, _i: FnArg) -> FnArg {
|
||||
match _i {
|
||||
FnArg::Receiver(_binding_0) => FnArg::Receiver(_visitor.fold_receiver(_binding_0)),
|
||||
FnArg::Typed(_binding_0) => FnArg::Typed(_visitor.fold_arg_typed(_binding_0)),
|
||||
FnArg::Typed(_binding_0) => FnArg::Typed(_visitor.fold_pat_type(_binding_0)),
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
|
@ -41,10 +41,6 @@ pub trait Visit<'ast> {
|
||||
visit_angle_bracketed_generic_arguments(self, i)
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
fn visit_arg_typed(&mut self, i: &'ast ArgTyped) {
|
||||
visit_arg_typed(self, i)
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
fn visit_arm(&mut self, i: &'ast Arm) {
|
||||
visit_arm(self, i)
|
||||
}
|
||||
@ -845,12 +841,6 @@ pub fn visit_angle_bracketed_generic_arguments<'ast, V: Visit<'ast> + ?Sized>(
|
||||
tokens_helper(_visitor, &_i.gt_token.spans);
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
pub fn visit_arg_typed<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast ArgTyped) {
|
||||
_visitor.visit_pat(&_i.pat);
|
||||
tokens_helper(_visitor, &_i.colon_token.spans);
|
||||
_visitor.visit_type(&_i.ty);
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
pub fn visit_arm<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast Arm) {
|
||||
for it in &_i.attrs {
|
||||
_visitor.visit_attribute(it)
|
||||
@ -1766,7 +1756,7 @@ pub fn visit_fn_arg<'ast, V: Visit<'ast> + ?Sized>(_visitor: &mut V, _i: &'ast F
|
||||
_visitor.visit_receiver(_binding_0);
|
||||
}
|
||||
FnArg::Typed(ref _binding_0) => {
|
||||
_visitor.visit_arg_typed(_binding_0);
|
||||
_visitor.visit_pat_type(_binding_0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,6 @@ pub trait VisitMut {
|
||||
visit_angle_bracketed_generic_arguments_mut(self, i)
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
fn visit_arg_typed_mut(&mut self, i: &mut ArgTyped) {
|
||||
visit_arg_typed_mut(self, i)
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
fn visit_arm_mut(&mut self, i: &mut Arm) {
|
||||
visit_arm_mut(self, i)
|
||||
}
|
||||
@ -848,12 +844,6 @@ pub fn visit_angle_bracketed_generic_arguments_mut<V: VisitMut + ?Sized>(
|
||||
tokens_helper(_visitor, &mut _i.gt_token.spans);
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
pub fn visit_arg_typed_mut<V: VisitMut + ?Sized>(_visitor: &mut V, _i: &mut ArgTyped) {
|
||||
_visitor.visit_pat_mut(&mut _i.pat);
|
||||
tokens_helper(_visitor, &mut _i.colon_token.spans);
|
||||
_visitor.visit_type_mut(&mut _i.ty);
|
||||
}
|
||||
#[cfg(feature = "full")]
|
||||
pub fn visit_arm_mut<V: VisitMut + ?Sized>(_visitor: &mut V, _i: &mut Arm) {
|
||||
for it in &mut _i.attrs {
|
||||
_visitor.visit_attribute_mut(it)
|
||||
@ -1742,7 +1732,7 @@ pub fn visit_fn_arg_mut<V: VisitMut + ?Sized>(_visitor: &mut V, _i: &mut FnArg)
|
||||
_visitor.visit_receiver_mut(_binding_0);
|
||||
}
|
||||
FnArg::Typed(ref mut _binding_0) => {
|
||||
_visitor.visit_arg_typed_mut(_binding_0);
|
||||
_visitor.visit_pat_type_mut(_binding_0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
21
syn.json
21
syn.json
@ -50,25 +50,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ident": "ArgTyped",
|
||||
"features": {
|
||||
"any": [
|
||||
"full"
|
||||
]
|
||||
},
|
||||
"fields": {
|
||||
"pat": {
|
||||
"syn": "Pat"
|
||||
},
|
||||
"colon_token": {
|
||||
"token": "Colon"
|
||||
},
|
||||
"ty": {
|
||||
"syn": "Type"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ident": "Arm",
|
||||
"features": {
|
||||
@ -2177,7 +2158,7 @@
|
||||
],
|
||||
"Typed": [
|
||||
{
|
||||
"syn": "ArgTyped"
|
||||
"syn": "PatType"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -48,15 +48,6 @@ impl Debug for Lite<syn::AngleBracketedGenericArguments> {
|
||||
formatter.finish()
|
||||
}
|
||||
}
|
||||
impl Debug for Lite<syn::ArgTyped> {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
let _val = &self.value;
|
||||
let mut formatter = formatter.debug_struct("ArgTyped");
|
||||
formatter.field("pat", Lite(&_val.pat));
|
||||
formatter.field("ty", Lite(&_val.ty));
|
||||
formatter.finish()
|
||||
}
|
||||
}
|
||||
impl Debug for Lite<syn::Arm> {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
let _val = &self.value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user