diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2022-03-04 17:05:30 -0500 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2022-03-04 17:05:30 -0500 |
| commit | fda9a561df39b60196c0a6e7417a6d50b163e92a (patch) | |
| tree | 6986582b89af5cd3a551e9fa5f7170035a96a961 | |
| parent | d37da1e332a77a4cd66c2f36b4a5457f40a7bfd5 (diff) | |
| download | rust-fda9a561df39b60196c0a6e7417a6d50b163e92a.tar.gz rust-fda9a561df39b60196c0a6e7417a6d50b163e92a.zip | |
Placate tidy in submodule.
| -rw-r--r-- | src/tools/rustfmt/src/parse/parser.rs | 8 | ||||
| -rw-r--r-- | src/tools/rustfmt/src/visitor.rs | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/tools/rustfmt/src/parse/parser.rs b/src/tools/rustfmt/src/parse/parser.rs index 6983249c15d..ec051d93710 100644 --- a/src/tools/rustfmt/src/parse/parser.rs +++ b/src/tools/rustfmt/src/parse/parser.rs @@ -113,7 +113,13 @@ impl<'a> Parser<'a> { let result = catch_unwind(AssertUnwindSafe(|| { let mut parser = new_parser_from_file(sess.inner(), path, Some(span)); match parser.parse_mod(&TokenKind::Eof) { - Ok((a, i, ast::ModSpans { inner_span, inject_use_span: _ })) => Some((a, i, inner_span)), + Ok((a, + i, + ast::ModSpans { + inner_span, + inject_use_span: _ + } + )) => Some((a, i, inner_span)), Err(mut e) => { e.emit(); if sess.can_reset_errors() { diff --git a/src/tools/rustfmt/src/visitor.rs b/src/tools/rustfmt/src/visitor.rs index dec977e98ca..dcf096294f1 100644 --- a/src/tools/rustfmt/src/visitor.rs +++ b/src/tools/rustfmt/src/visitor.rs @@ -916,7 +916,10 @@ impl<'b, 'a: 'b> FmtVisitor<'a> { self.push_str(&ident_str); if let ast::ModKind::Loaded(ref items, ast::Inline::Yes, ref spans) = mod_kind { - let ast::ModSpans{ inner_span, inject_use_span: _ } = *spans; + let ast::ModSpans{ + inner_span, + inject_use_span: _ + } = *spans; match self.config.brace_style() { BraceStyle::AlwaysNextLine => { let indent_str = self.block_indent.to_string_with_newline(self.config); |
