Resolve default_trait_access lint
This commit is contained in:
parent
c45ab6b304
commit
d827b101d9
@ -200,7 +200,7 @@ pub fn with_bound(
|
|||||||
lifetimes: None,
|
lifetimes: None,
|
||||||
// the type parameter that is being bounded e.g. T
|
// the type parameter that is being bounded e.g. T
|
||||||
bounded_ty: syn::Type::Path(bounded_ty),
|
bounded_ty: syn::Type::Path(bounded_ty),
|
||||||
colon_token: Default::default(),
|
colon_token: <Token![:]>::default(),
|
||||||
// the bound e.g. Serialize
|
// the bound e.g. Serialize
|
||||||
bounds: vec![syn::TypeParamBound::Trait(syn::TraitBound {
|
bounds: vec![syn::TypeParamBound::Trait(syn::TraitBound {
|
||||||
paren_token: None,
|
paren_token: None,
|
||||||
@ -233,7 +233,7 @@ pub fn with_self_bound(
|
|||||||
lifetimes: None,
|
lifetimes: None,
|
||||||
// the type that is being bounded e.g. MyStruct<'a, T>
|
// the type that is being bounded e.g. MyStruct<'a, T>
|
||||||
bounded_ty: type_of_item(cont),
|
bounded_ty: type_of_item(cont),
|
||||||
colon_token: Default::default(),
|
colon_token: <Token![:]>::default(),
|
||||||
// the bound e.g. Default
|
// the bound e.g. Default
|
||||||
bounds: vec![syn::TypeParamBound::Trait(syn::TraitBound {
|
bounds: vec![syn::TypeParamBound::Trait(syn::TraitBound {
|
||||||
paren_token: None,
|
paren_token: None,
|
||||||
@ -289,7 +289,7 @@ fn type_of_item(cont: &Container) -> syn::Type {
|
|||||||
arguments: syn::PathArguments::AngleBracketed(
|
arguments: syn::PathArguments::AngleBracketed(
|
||||||
syn::AngleBracketedGenericArguments {
|
syn::AngleBracketedGenericArguments {
|
||||||
colon2_token: None,
|
colon2_token: None,
|
||||||
lt_token: Default::default(),
|
lt_token: <Token![<]>::default(),
|
||||||
args: cont
|
args: cont
|
||||||
.generics
|
.generics
|
||||||
.params
|
.params
|
||||||
@ -309,7 +309,7 @@ fn type_of_item(cont: &Container) -> syn::Type {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect(),
|
.collect(),
|
||||||
gt_token: Default::default(),
|
gt_token: <Token![>]>::default(),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
}].into_iter()
|
}].into_iter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user