Skip to content

Commit 07b8caf

Browse files
committed
Renamed placeholder to debug_placeholder
1 parent fdacd37 commit 07b8caf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

partialdebug-derive/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub fn derive_non_exhaustive(input: TokenStream) -> TokenStream {
5050
TokenStream::from(expanded)
5151
}
5252

53-
#[proc_macro_derive(PlaceholderPartialDebug, attributes(placeholder))]
53+
#[proc_macro_derive(PlaceholderPartialDebug, attributes(debug_placeholder))]
5454
pub fn derive_placeholder(input: TokenStream) -> TokenStream {
5555
let input = parse_macro_input!(input as ItemStruct);
5656
let placeholder = match get_placeholder(&input) {
@@ -117,13 +117,13 @@ fn get_placeholder(input: &ItemStruct) -> Result<Option<String>> {
117117
let placeholders: Vec<_> = input
118118
.attrs
119119
.iter()
120-
.filter(|attribute| attribute.path.is_ident("placeholder"))
120+
.filter(|attribute| attribute.path.is_ident("debug_placeholder"))
121121
.collect();
122122

123123
if placeholders.len() > 1 {
124124
return Err(Error::new_spanned(
125125
placeholders[1],
126-
"More than one placeholder attribute",
126+
"More than one debug_placeholder attribute",
127127
));
128128
}
129129

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
//! # }
8282
//! #
8383
//! #[derive(PartialDebug)]
84-
//! #[placeholder = "Unknown"]
84+
//! #[debug_placeholder = "Unknown"]
8585
//! struct Dog {
8686
//! legs: usize,
8787
//! eyes: usize,

0 commit comments

Comments
 (0)