diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-10 16:08:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-10 16:08:26 +0200 |
| commit | 3c299a987cfd9522c4e1f6e53ed79123b4a4acab (patch) | |
| tree | 7b38859ec1d80e79e50861dac5caa24d231572db /src/libsyntax/parse/parser.rs | |
| parent | d0cec040de22555519e991f08a48ec0b1b62fbc6 (diff) | |
| parent | 56a9237b595b4523f2be3123d52662739e89d4c2 (diff) | |
| download | rust-3c299a987cfd9522c4e1f6e53ed79123b4a4acab.tar.gz rust-3c299a987cfd9522c4e1f6e53ed79123b4a4acab.zip | |
Rollup merge of #62532 - Mark-Simulacrum:syntax-print-cleanup, r=petrochenkov
Some more cleanups to syntax::print All of these changes should be functionally equivalent to previous code. Each commit mostly stands alone and this PR is easiest to review by-commit.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a95b6891fb9..83dbff6b2d5 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2571,7 +2571,6 @@ impl<'a> Parser<'a> { None => continue, }; let sugg = pprust::to_string(|s| { - use crate::print::pprust::PrintState; s.popen(); s.print_expr(&e); s.s.word( "."); @@ -4588,11 +4587,11 @@ impl<'a> Parser<'a> { stmt_span = stmt_span.with_hi(self.prev_span.hi()); } let sugg = pprust::to_string(|s| { - use crate::print::pprust::{PrintState, INDENT_UNIT}; + use crate::print::pprust::INDENT_UNIT; s.ibox(INDENT_UNIT); s.bopen(); s.print_stmt(&stmt); - s.bclose_maybe_open(stmt.span, INDENT_UNIT, false) + s.bclose_maybe_open(stmt.span, false) }); e.span_suggestion( stmt_span, |
