We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc5f3e2 commit 05f459eCopy full SHA for 05f459e
src/tools/rustfmt/src/macros.rs
@@ -226,7 +226,7 @@ fn rewrite_macro_inner(
226
}
227
// Format well-known macros which cannot be parsed as a valid AST.
228
if macro_name == "lazy_static!" && !has_comment {
229
- if let success @ Some(..) = format_lazy_static(context, shape, ts.trees().collect()) {
+ if let success @ Some(..) = format_lazy_static(context, shape, ts.clone()) {
230
return success;
231
232
@@ -855,7 +855,7 @@ impl MacroArgParser {
855
856
/// Returns a collection of parsed macro def's arguments.
857
fn parse(mut self, tokens: TokenStream) -> Option<Vec<ParsedMacroArg>> {
858
- let mut iter = tokens.trees();
+ let mut iter = tokens.into_trees();
859
860
while let Some(tok) = iter.next() {
861
match tok {
0 commit comments