chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791)
Successor to #27779 - in this PR I've applied changes manually, without futzing with if let lifetimes at all. Release Notes: - N/A
This commit is contained in:
parent
d51aa2ffb0
commit
0729d24d77
162 changed files with 2333 additions and 1937 deletions
|
@ -100,13 +100,13 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
|||
}
|
||||
} else if is_optional {
|
||||
quote! {
|
||||
if let Some(ref value) = &refinement.#name {
|
||||
if let Some(value) = &refinement.#name {
|
||||
self.#name = Some(value.clone());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
quote! {
|
||||
if let Some(ref value) = &refinement.#name {
|
||||
if let Some(value) = &refinement.#name {
|
||||
self.#name = value.clone();
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
|||
}
|
||||
} else {
|
||||
quote! {
|
||||
if let Some(ref value) = &refinement.#name {
|
||||
if let Some(value) = &refinement.#name {
|
||||
self.#name = Some(value.clone());
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
|||
derive_stream.extend(quote! { #[derive(#trait_to_derive)] })
|
||||
}
|
||||
|
||||
let gen = quote! {
|
||||
let r#gen = quote! {
|
||||
/// A refinable version of [`#ident`], see that documentation for details.
|
||||
#[derive(Clone)]
|
||||
#derive_stream
|
||||
|
@ -321,7 +321,7 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {
|
|||
|
||||
#debug_impl
|
||||
};
|
||||
gen.into()
|
||||
r#gen.into()
|
||||
}
|
||||
|
||||
fn is_refineable_field(f: &Field) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue