]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #16839 : treeman/issue-15358
authorAlex Crichton <alex@alexcrichton.com>
Sun, 31 Aug 2014 06:47:23 +0000 (23:47 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 31 Aug 2014 06:47:23 +0000 (23:47 -0700)
12 files changed:
src/doc/guide.md
src/libsyntax/parse/parser.rs
src/test/compile-fail/bad-value-ident-false.rs
src/test/compile-fail/bad-value-ident-true.rs
src/test/compile-fail/keyword-super.rs
src/test/compile-fail/keyword.rs
src/test/compile-fail/removed-syntax-field-let.rs
src/test/compile-fail/removed-syntax-mut-vec-expr.rs
src/test/compile-fail/removed-syntax-mut-vec-ty.rs
src/test/compile-fail/removed-syntax-uniq-mut-expr.rs
src/test/compile-fail/removed-syntax-uniq-mut-ty.rs
src/test/compile-fail/unsized2.rs

index a22e69feb07403e167b0e6b34536aa82e9b4a448..4c8dd86c61618933db74ca04c43fb1751eb7b12c 100644 (file)
@@ -630,7 +630,7 @@ In Rust, however, using `let` to introduce a binding is _not_ an expression. The
 following will produce a compile-time error:
 
 ```{ignore}
-let x = (let y = 5i); // found `let` in ident position
+let x = (let y = 5i); // expected identifier, found keyword `let`
 ```
 
 The compiler is telling us here that it was expecting to see the beginning of
index 60f244011529012856cd3653ecdd3a537f22de1c..fc93e482adc931181b193eb914ba45a3621f63a6 100644 (file)
@@ -599,7 +599,7 @@ pub fn check_strict_keywords(&mut self) {
             let token_str = self.this_token_to_string();
             let span = self.span;
             self.span_err(span,
-                          format!("found `{}` in ident position",
+                          format!("expected identifier, found keyword `{}`",
                                   token_str).as_slice());
         }
     }
index 17157623863adca5673368329640848acb130e8f..ca10bdd9848ece78f7f018e68b6dac5b2ca10249 100644 (file)
@@ -8,5 +8,5 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn false() { } //~ ERROR found `false` in ident position
+fn false() { } //~ ERROR expected identifier, found keyword `false`
 fn main() { }
index 5160471e95c80937d6f224d41ab5db060e0bf8d9..4508d5219a21735f71c93fa9f4a50123b96da25a 100644 (file)
@@ -8,5 +8,5 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn true() { } //~ ERROR found `true` in ident position
+fn true() { } //~ ERROR expected identifier, found keyword `true`
 fn main() { }
index 0a4ec841bd3cebc81b2b2475e2f635ac18fb3d95..6cbc8aa1ea642509af53ea077ab9b765315b3bda 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    let super: int; //~ ERROR found `super` in ident position
+    let super: int; //~ ERROR expected identifier, found keyword `super`
 }
index 2df56a0ab7c22fbc946099ece67a48a5609913ce..64eac47e69b329b97d9ce93409c560b413c03ca9 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 pub mod break {
-    //~^ ERROR found `break` in ident position
+    //~^ ERROR expected identifier, found keyword `break`
 }
index 2b76db4f160a46bca219d703e314ae69f35d0037..c8711598163a0c199278b71def8a6f1176060491 100644 (file)
@@ -10,6 +10,6 @@
 
 struct s {
     let foo: (),
-    //~^  ERROR found `let` in ident position
+    //~^  ERROR expected identifier, found keyword `let`
     //~^^ ERROR expected `:`, found `foo`
 }
index 9f0cc0107c1f8c48c8a0085f3a12cfbbe084f150..b20da6346f775decc0e124afde42598dd2b2cd22 100644 (file)
@@ -10,6 +10,6 @@
 
 fn f() {
     let v = [mut 1, 2, 3, 4];
-    //~^  ERROR found `mut` in ident position
+    //~^  ERROR expected identifier, found keyword `mut`
     //~^^ ERROR expected `]`, found `1`
 }
index 912952892e4f72e02327649aaa44f3f9ea388122..c5eec2ef6e19930f43e35458c3b3fa5fed3fa4ba 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 type v = [mut int];
-    //~^  ERROR found `mut` in ident position
+    //~^  ERROR expected identifier, found keyword `mut`
     //~^^ ERROR expected `]`, found `int`
index f4fc5b696fa4b6fa1d837c3e99c008693fb8c3f3..124b3738fab5ffd6e9041f0eb67010adf3732504 100644 (file)
@@ -10,6 +10,6 @@
 
 fn f() {
     let a_box = box mut 42;
-    //~^  ERROR found `mut` in ident position
+    //~^  ERROR expected identifier, found keyword `mut`
     //~^^ ERROR expected `;`, found `42`
 }
index a3fc27d8cf2e0f83b38ba7a64b6b0cf20f9723a5..579bfed1331ed5e4467d52b6f5244fbbef4442a8 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 type mut_box = Box<mut int>;
-    //~^  ERROR found `mut` in ident position
+    //~^  ERROR expected identifier, found keyword `mut`
     //~^^ ERROR expected `,`, found `int`
index 0c9d05e29883261d2856d241c653ecad46027459..c5f9e8d5991938878d669152669f493ef2cb874b 100644 (file)
@@ -13,5 +13,5 @@
 fn f<X>() {}
 
 pub fn main() {
-    f<type>(); //~ ERROR found `type` in ident position
+    f<type>(); //~ ERROR expected identifier, found keyword `type`
 }