about summary refs log tree commit diff
path: root/src/libsyntax/parse/diagnostics.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-05 06:55:48 +0000
committerbors <bors@rust-lang.org>2019-07-05 06:55:48 +0000
commitf119bf2761ab11ca577fac9881678c04d3e7fdb0 (patch)
treef48f186557f8b204878001e23f7703c58908a063 /src/libsyntax/parse/diagnostics.rs
parentbaab1914ec9a9742776a8147780947b48fddf54d (diff)
parentd26c4b7bd6e5905280dd4441482331fb9fb65e07 (diff)
downloadrust-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/diagnostics.rs')
-rw-r--r--src/libsyntax/parse/diagnostics.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/diagnostics.rs b/src/libsyntax/parse/diagnostics.rs
index 0ea0b2a694d..edcdb18a037 100644
--- a/src/libsyntax/parse/diagnostics.rs
+++ b/src/libsyntax/parse/diagnostics.rs
@@ -613,12 +613,12 @@ impl<'a> Parser<'a> {
                 let sum_with_parens = pprust::to_string(|s| {
                     use crate::print::pprust::PrintState;
 
-                    s.s.word("&")?;
-                    s.print_opt_lifetime(lifetime)?;
-                    s.print_mutability(mut_ty.mutbl)?;
-                    s.popen()?;
-                    s.print_type(&mut_ty.ty)?;
-                    s.print_type_bounds(" +", &bounds)?;
+                    s.s.word("&");
+                    s.print_opt_lifetime(lifetime);
+                    s.print_mutability(mut_ty.mutbl);
+                    s.popen();
+                    s.print_type(&mut_ty.ty);
+                    s.print_type_bounds(" +", &bounds);
                     s.pclose()
                 });
                 err.span_suggestion(