about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-06-24 14:15:11 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2019-06-29 09:10:17 -0400
commitda5c835c8bc7c283a97dd9c7f183755473ecf810 (patch)
tree7565b095d08f4e6f3b7db20b921715ed28bf3a59 /src/libsyntax/parse/parser.rs
parent1aff8af213d76d746a4a86bf1b1c44af9d3d5691 (diff)
downloadrust-da5c835c8bc7c283a97dd9c7f183755473ecf810.tar.gz
rust-da5c835c8bc7c283a97dd9c7f183755473ecf810.zip
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.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index fc206580e38..3143f2b9971 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(
@@ -4634,9 +4634,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(