mirror of https://github.com/rust-lang/reference
Fix clippy warning in procedural macro example
I copy+pasted this example into my code and the `clippy::to_string_in_format_args` lint fired.
This commit is contained in:
parent
984b36eca4
commit
a7a86824fa
|
@ -234,8 +234,8 @@ shown in the comments after the function prefixed with "out:".
|
|||
|
||||
#[proc_macro_attribute]
|
||||
pub fn show_streams(attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
println!("attr: \"{}\"", attr.to_string());
|
||||
println!("item: \"{}\"", item.to_string());
|
||||
println!("attr: \"{attr}\"");
|
||||
println!("item: \"{item}\"");
|
||||
item
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue