diff --git a/Cargo.toml b/Cargo.toml index 5bc102d..17d5f47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/mcarton/rust-derivative" description = "A set of alternative `derive` attributes for Rust" keywords = ["derive", "macro", "macro1-1", "plugin"] categories = ["rust-patterns"] +edition = "2021" [lib] proc-macro = true @@ -19,10 +20,15 @@ quote = "1.0" syn = { version = "1.0.3", features = ["visit", "extra-traits"] } [dev-dependencies] -# 1.0.23 requires rustc 1.36, while our msrv is 1.34 runtime-macros-derive = "0.4.0" +# 1.0.23 requires rustc 1.36, while our msrv is 1.34 trybuild = "1.0.18, <1.0.23" walkdir = "2" +# 1.0.73 requires itoa 1.0.0, which requires rustc 1.36, while our msrv is 1.34 +serde_json = "=1.0.72" +itoa = "=0.4.3" +# 1.0.7 requires rustc 1.36, while our msrv is 1.34 +ryu = "=1.0.6" [features] use_core = [] diff --git a/src/debug.rs b/src/debug.rs index ed667c1..a8875a0 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -103,7 +103,7 @@ pub fn derive(input: &ast::Input) -> proc_macro2::TokenStream { #[allow(unused_qualifications)] #[allow(clippy::unneeded_field_pattern)] impl #impl_generics #debug_trait_path for #name #ty_generics #where_clause { - fn fmt(&self, #formatter: &mut #fmt_path::Formatter) -> #fmt_path::Result { + fn fmt(&self, #formatter: &mut #fmt_path::Formatter<'_>) -> #fmt_path::Result { #match_self { #body } @@ -212,7 +212,7 @@ fn format_with( struct Dummy #impl_generics (&'_derivative #ty, #phantom_path <(#(#phantom,)*)>) #where_clause; impl #impl_generics #debug_trait_path for Dummy #ty_generics #where_clause { - fn fmt(&self, __f: &mut #fmt_path::Formatter) -> #fmt_path::Result { + fn fmt(&self, __f: &mut #fmt_path::Formatter<'_>) -> #fmt_path::Result { #match_self { this => #format_fn(this, __f) }