diff options
| author | klensy <klensy@users.noreply.github.com> | 2022-05-18 19:02:06 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2022-05-18 20:43:16 +0300 |
| commit | 05f459ea82276044c0c006c10ea54e450aa574c7 (patch) | |
| tree | 7940ac2455436dd193d3f1dde246c933668aac91 | |
| parent | cc5f3e21ac365d793d776b26f16be7801ee04cf3 (diff) | |
| download | rust-05f459ea82276044c0c006c10ea54e450aa574c7.tar.gz rust-05f459ea82276044c0c006c10ea54e450aa574c7.zip | |
fix rustfmt
| -rw-r--r-- | src/tools/rustfmt/src/macros.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/rustfmt/src/macros.rs b/src/tools/rustfmt/src/macros.rs index 26c429eb94f..f4b2bcf2815 100644 --- a/src/tools/rustfmt/src/macros.rs +++ b/src/tools/rustfmt/src/macros.rs @@ -226,7 +226,7 @@ fn rewrite_macro_inner( } // Format well-known macros which cannot be parsed as a valid AST. if macro_name == "lazy_static!" && !has_comment { - if let success @ Some(..) = format_lazy_static(context, shape, ts.trees().collect()) { + if let success @ Some(..) = format_lazy_static(context, shape, ts.clone()) { return success; } } @@ -855,7 +855,7 @@ impl MacroArgParser { /// Returns a collection of parsed macro def's arguments. fn parse(mut self, tokens: TokenStream) -> Option<Vec<ParsedMacroArg>> { - let mut iter = tokens.trees(); + let mut iter = tokens.into_trees(); while let Some(tok) = iter.next() { match tok { |
