Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = []
4 changes: 2 additions & 2 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
}
Expand Down