diff options
| author | bors <bors@rust-lang.org> | 2019-07-05 06:55:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-07-05 06:55:48 +0000 |
| commit | f119bf2761ab11ca577fac9881678c04d3e7fdb0 (patch) | |
| tree | f48f186557f8b204878001e23f7703c58908a063 /src/libsyntax/parse/parser.rs | |
| parent | baab1914ec9a9742776a8147780947b48fddf54d (diff) | |
| parent | d26c4b7bd6e5905280dd4441482331fb9fb65e07 (diff) | |
| download | rust-f119bf2761ab11ca577fac9881678c04d3e7fdb0.tar.gz rust-f119bf2761ab11ca577fac9881678c04d3e7fdb0.zip | |
Auto merge of #62099 - Mark-Simulacrum:syntax-print-clean-2, r=eddyb
Remove io::Result from syntax::print Since we're now writing directly to the vector, there's no need to thread results through the whole printing infrastructure
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 9c179600093..cef14632e64 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2572,12 +2572,12 @@ impl<'a> Parser<'a> { }; let sugg = pprust::to_string(|s| { use crate::print::pprust::PrintState; - s.popen()?; - s.print_expr(&e)?; - s.s.word( ".")?; - s.print_usize(float.trunc() as usize)?; - s.pclose()?; - s.s.word(".")?; + s.popen(); + s.print_expr(&e); + s.s.word( "."); + s.print_usize(float.trunc() as usize); + s.pclose(); + s.s.word("."); s.s.word(fstr.splitn(2, ".").last().unwrap().to_string()) }); err.span_suggestion( @@ -4583,9 +4583,9 @@ impl<'a> Parser<'a> { } let sugg = pprust::to_string(|s| { use crate::print::pprust::{PrintState, INDENT_UNIT}; - s.ibox(INDENT_UNIT)?; - s.bopen()?; - s.print_stmt(&stmt)?; + s.ibox(INDENT_UNIT); + s.bopen(); + s.print_stmt(&stmt); s.bclose_maybe_open(stmt.span, INDENT_UNIT, false) }); e.span_suggestion( |
