diff options
| author | bors <bors@rust-lang.org> | 2014-02-08 13:56:45 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-08 13:56:45 -0800 |
| commit | cba7ac5e014e7e225a4e226f15e9c05563d6e4a9 (patch) | |
| tree | 4173461fe0af3aa02aabdd2d6a216055b6426a41 /src/libsyntax/parse | |
| parent | c8759f6b56735d444288661655527edbc5ac333f (diff) | |
| parent | ee3fa68fed13e7b8cde523e4bc73b9a07d082212 (diff) | |
| download | rust-cba7ac5e014e7e225a4e226f15e9c05563d6e4a9.tar.gz rust-cba7ac5e014e7e225a4e226f15e9c05563d6e4a9.zip | |
auto merge of #12065 : mrshu/rust/error-formating-fix, r=alexcrichton
This pull request tries to fix #12050. I went after these wrong errors quite aggressively so it might be that I also changed some strings that are not actual errors. Please point those out and I will update this pull request accordingly.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index b85d89cf804..091fbf82b0d 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -76,7 +76,7 @@ impl ParserObsoleteMethods for Parser { let (kind_str, desc) = match kind { ObsoleteSwap => ( "swap", - "Use std::util::{swap, replace} instead" + "use std::util::{swap, replace} instead" ), ObsoleteUnsafeBlock => ( "non-standalone unsafe block", diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 93574f4d858..fd8b945a177 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -431,7 +431,7 @@ impl Parser { && self.look_ahead(1, |t| *t == token::RBRACE) { // matched; signal non-fatal error and recover. self.span_err(self.span, - "Unit-like struct construction is written with no trailing `{ }`"); + "unit-like struct construction is written with no trailing `{ }`"); self.eat(&token::LBRACE); self.eat(&token::RBRACE); true @@ -1601,7 +1601,7 @@ impl Parser { }; } _ => { - self.fatal(format!("Expected a lifetime name")); + self.fatal(format!("expected a lifetime name")); } } } @@ -2137,7 +2137,7 @@ impl Parser { } // There shouldn't really be a span, but it's easier for the test runner // if we give it one - self.fatal("This file contains an un-closed delimiter "); + self.fatal("this file contains an un-closed delimiter "); } token::LPAREN | token::LBRACE | token::LBRACKET => { let close_delim = token::flip_delimiter(&self.token); @@ -3957,7 +3957,7 @@ impl Parser { } if fields.len() == 0 { let string = get_ident_interner().get(class_name.name); - self.fatal(format!("Unit-like struct definition should be written as `struct {};`", + self.fatal(format!("unit-like struct definition should be written as `struct {};`", string.as_slice())); } self.bump(); |
