about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 9e2829e6380..e798ca0e38a 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -413,7 +413,7 @@ impl<'a> Parser<'a> {
         } else {
             let token_str = Parser::token_to_string(t);
             let this_token_str = self.this_token_to_string();
-            self.fatal(format!("expected `{}` but found `{}`",
+            self.fatal(format!("expected `{}`, found `{}`",
                                token_str,
                                this_token_str).as_slice())
         }
@@ -447,11 +447,11 @@ impl<'a> Parser<'a> {
             let actual = self.this_token_to_string();
             self.fatal(
                 (if expected.len() != 1 {
-                    (format!("expected one of `{}` but found `{}`",
+                    (format!("expected one of `{}`, found `{}`",
                              expect,
                              actual))
                 } else {
-                    (format!("expected `{}` but found `{}`",
+                    (format!("expected `{}`, found `{}`",
                              expect,
                              actual))
                 }).as_slice()
@@ -1314,7 +1314,7 @@ impl<'a> Parser<'a> {
 
               _ => {
                   let token_str = p.this_token_to_string();
-                  p.fatal((format!("expected `;` or `{{` but found `{}`",
+                  p.fatal((format!("expected `;` or `{{`, found `{}`",
                                    token_str)).as_slice())
               }
             }
@@ -3375,7 +3375,7 @@ impl<'a> Parser<'a> {
                         ""
                     };
                     let tok_str = self.this_token_to_string();
-                    self.fatal(format!("expected {}`(` or `{{`, but found `{}`",
+                    self.fatal(format!("expected {}`(` or `{{`, found `{}`",
                                        ident_str,
                                        tok_str).as_slice())
                 }
@@ -3924,7 +3924,7 @@ impl<'a> Parser<'a> {
             },
             _ => {
                 let token_str = self.this_token_to_string();
-                self.fatal(format!("expected `self` but found `{}`",
+                self.fatal(format!("expected `self`, found `{}`",
                                    token_str).as_slice())
             }
         }
@@ -4455,7 +4455,7 @@ impl<'a> Parser<'a> {
         } else {
             let token_str = self.this_token_to_string();
             self.fatal(format!("expected `{}`, `(`, or `;` after struct \
-                                name but found `{}`", "{",
+                                name, found `{}`", "{",
                                token_str).as_slice())
         }
 
@@ -4486,7 +4486,7 @@ impl<'a> Parser<'a> {
                 let span = self.span;
                 let token_str = self.this_token_to_string();
                 self.span_fatal(span,
-                                format!("expected `,`, or `}}` but found `{}`",
+                                format!("expected `,`, or `}}`, found `{}`",
                                         token_str).as_slice())
             }
         }
@@ -4566,7 +4566,7 @@ impl<'a> Parser<'a> {
               }
               _ => {
                   let token_str = self.this_token_to_string();
-                  self.fatal(format!("expected item but found `{}`",
+                  self.fatal(format!("expected item, found `{}`",
                                      token_str).as_slice())
               }
             }
@@ -5107,7 +5107,7 @@ impl<'a> Parser<'a> {
             let span = self.span;
             let token_str = self.this_token_to_string();
             self.span_fatal(span,
-                            format!("expected `{}` or `fn` but found `{}`", "{",
+                            format!("expected `{}` or `fn`, found `{}`", "{",
                                     token_str).as_slice());
         }