about summary refs log tree commit diff
path: root/src/test/parse-fail
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-04-24 21:35:50 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-04-24 21:35:50 +0300
commit4bd44be369c883f1fb2b0645f4de4827066cec57 (patch)
tree45ebb49d89bc2977957642fd4bd8fbe2e3a29cc8 /src/test/parse-fail
parent9108fb7bae11f18715d971eeae1e5ca84662e1ee (diff)
downloadrust-4bd44be369c883f1fb2b0645f4de4827066cec57.tar.gz
rust-4bd44be369c883f1fb2b0645f4de4827066cec57.zip
Fix keyword parsing tests
Diffstat (limited to 'src/test/parse-fail')
-rw-r--r--src/test/parse-fail/keyword-as-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-box-as-identifier.rs15
-rw-r--r--src/test/parse-fail/keyword-break-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-const-as-identifier.rs17
-rw-r--r--src/test/parse-fail/keyword-continue-as-identifier.rs17
-rw-r--r--src/test/parse-fail/keyword-crate-as-identifier.rs17
-rw-r--r--src/test/parse-fail/keyword-else-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-enum-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-extern-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-fn-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-for-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-if-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-impl-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-in-as-identifier.rs17
-rw-r--r--src/test/parse-fail/keyword-let-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-loop-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-match-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-mod-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-move-as-identifier.rs17
-rw-r--r--src/test/parse-fail/keyword-mut-as-identifier.rs6
-rw-r--r--src/test/parse-fail/keyword-pub-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-ref-as-identifier.rs6
-rw-r--r--src/test/parse-fail/keyword-return-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-self-as-identifier.rs6
-rw-r--r--src/test/parse-fail/keyword-static-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-struct-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-super-as-identifier.rs6
-rw-r--r--src/test/parse-fail/keyword-trait-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-type-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-unsafe-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-use-as-identifier.rs4
-rw-r--r--src/test/parse-fail/keyword-where-as-identifier.rs17
-rw-r--r--src/test/parse-fail/keyword-while-as-identifier.rs4
33 files changed, 169 insertions, 60 deletions
diff --git a/src/test/parse-fail/keyword-as-as-identifier.rs b/src/test/parse-fail/keyword-as-as-identifier.rs
index bc05a7c4f25..c6070c456e8 100644
--- a/src/test/parse-fail/keyword-as-as-identifier.rs
+++ b/src/test/parse-fail/keyword-as-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py as'
 
 fn main() {
-    let as = "foo"; //~ error: ident
+    let as = "foo"; //~ error: expected pattern, found keyword `as`
 }
diff --git a/src/test/parse-fail/keyword-box-as-identifier.rs b/src/test/parse-fail/keyword-box-as-identifier.rs
new file mode 100644
index 00000000000..b5abe14dbe8
--- /dev/null
+++ b/src/test/parse-fail/keyword-box-as-identifier.rs
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+fn main() {
+    let box = "foo"; //~ error: expected pattern, found `=`
+}
diff --git a/src/test/parse-fail/keyword-break-as-identifier.rs b/src/test/parse-fail/keyword-break-as-identifier.rs
index bd7527f399e..65c775fa1b6 100644
--- a/src/test/parse-fail/keyword-break-as-identifier.rs
+++ b/src/test/parse-fail/keyword-break-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py break'
 
 fn main() {
-    let break = "foo"; //~ error: ident
+    let break = "foo"; //~ error: expected pattern, found keyword `break`
 }
diff --git a/src/test/parse-fail/keyword-const-as-identifier.rs b/src/test/parse-fail/keyword-const-as-identifier.rs
new file mode 100644
index 00000000000..6ecf14957e3
--- /dev/null
+++ b/src/test/parse-fail/keyword-const-as-identifier.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py const'
+
+fn main() {
+    let const = "foo"; //~ error: expected pattern, found keyword `const`
+}
diff --git a/src/test/parse-fail/keyword-continue-as-identifier.rs b/src/test/parse-fail/keyword-continue-as-identifier.rs
new file mode 100644
index 00000000000..87377ac8364
--- /dev/null
+++ b/src/test/parse-fail/keyword-continue-as-identifier.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py continue'
+
+fn main() {
+    let continue = "foo"; //~ error: expected pattern, found keyword `continue`
+}
diff --git a/src/test/parse-fail/keyword-crate-as-identifier.rs b/src/test/parse-fail/keyword-crate-as-identifier.rs
new file mode 100644
index 00000000000..8a914ca7b17
--- /dev/null
+++ b/src/test/parse-fail/keyword-crate-as-identifier.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py crate'
+
+fn main() {
+    let crate = "foo"; //~ error: expected pattern, found keyword `crate`
+}
diff --git a/src/test/parse-fail/keyword-else-as-identifier.rs b/src/test/parse-fail/keyword-else-as-identifier.rs
index 24bd18a738f..6878f7fea03 100644
--- a/src/test/parse-fail/keyword-else-as-identifier.rs
+++ b/src/test/parse-fail/keyword-else-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py else'
 
 fn main() {
-    let else = "foo"; //~ error: ident
+    let else = "foo"; //~ error: expected pattern, found keyword `else`
 }
diff --git a/src/test/parse-fail/keyword-enum-as-identifier.rs b/src/test/parse-fail/keyword-enum-as-identifier.rs
index e4745270414..042a02d79e0 100644
--- a/src/test/parse-fail/keyword-enum-as-identifier.rs
+++ b/src/test/parse-fail/keyword-enum-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py enum'
 
 fn main() {
-    let enum = "foo"; //~ error: ident
+    let enum = "foo"; //~ error: expected pattern, found keyword `enum`
 }
diff --git a/src/test/parse-fail/keyword-extern-as-identifier.rs b/src/test/parse-fail/keyword-extern-as-identifier.rs
index 579cd9f9166..3bbe24ed56c 100644
--- a/src/test/parse-fail/keyword-extern-as-identifier.rs
+++ b/src/test/parse-fail/keyword-extern-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py extern'
 
 fn main() {
-    let extern = "foo"; //~ error: ident
+    let extern = "foo"; //~ error: expected pattern, found keyword `extern`
 }
diff --git a/src/test/parse-fail/keyword-fn-as-identifier.rs b/src/test/parse-fail/keyword-fn-as-identifier.rs
index 0ace9ddf1f0..0d454f67d1c 100644
--- a/src/test/parse-fail/keyword-fn-as-identifier.rs
+++ b/src/test/parse-fail/keyword-fn-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py fn'
 
 fn main() {
-    let fn = "foo"; //~ error: ident
+    let fn = "foo"; //~ error: expected pattern, found keyword `fn`
 }
diff --git a/src/test/parse-fail/keyword-for-as-identifier.rs b/src/test/parse-fail/keyword-for-as-identifier.rs
index 035c87b80bb..d341669f727 100644
--- a/src/test/parse-fail/keyword-for-as-identifier.rs
+++ b/src/test/parse-fail/keyword-for-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py for'
 
 fn main() {
-    let for = "foo"; //~ error: ident
+    let for = "foo"; //~ error: expected pattern, found keyword `for`
 }
diff --git a/src/test/parse-fail/keyword-if-as-identifier.rs b/src/test/parse-fail/keyword-if-as-identifier.rs
index 1aad0a780f9..417e40425e0 100644
--- a/src/test/parse-fail/keyword-if-as-identifier.rs
+++ b/src/test/parse-fail/keyword-if-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py if'
 
 fn main() {
-    let if = "foo"; //~ error: ident
+    let if = "foo"; //~ error: expected pattern, found keyword `if`
 }
diff --git a/src/test/parse-fail/keyword-impl-as-identifier.rs b/src/test/parse-fail/keyword-impl-as-identifier.rs
index 585109505d4..fe97c191f68 100644
--- a/src/test/parse-fail/keyword-impl-as-identifier.rs
+++ b/src/test/parse-fail/keyword-impl-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py impl'
 
 fn main() {
-    let impl = "foo"; //~ error: ident
+    let impl = "foo"; //~ error: expected pattern, found keyword `impl`
 }
diff --git a/src/test/parse-fail/keyword-in-as-identifier.rs b/src/test/parse-fail/keyword-in-as-identifier.rs
new file mode 100644
index 00000000000..c0f9396b981
--- /dev/null
+++ b/src/test/parse-fail/keyword-in-as-identifier.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py in'
+
+fn main() {
+    let in = "foo"; //~ error: expected pattern, found keyword `in`
+}
diff --git a/src/test/parse-fail/keyword-let-as-identifier.rs b/src/test/parse-fail/keyword-let-as-identifier.rs
index 07bc7901686..5d6dca78d78 100644
--- a/src/test/parse-fail/keyword-let-as-identifier.rs
+++ b/src/test/parse-fail/keyword-let-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py let'
 
 fn main() {
-    let let = "foo"; //~ error: ident
+    let let = "foo"; //~ error: expected pattern, found keyword `let`
 }
diff --git a/src/test/parse-fail/keyword-loop-as-identifier.rs b/src/test/parse-fail/keyword-loop-as-identifier.rs
index 7b2b10a2d6d..7c3d11d67f6 100644
--- a/src/test/parse-fail/keyword-loop-as-identifier.rs
+++ b/src/test/parse-fail/keyword-loop-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py loop'
 
 fn main() {
-    let loop = "foo"; //~ error: ident
+    let loop = "foo"; //~ error: expected pattern, found keyword `loop`
 }
diff --git a/src/test/parse-fail/keyword-match-as-identifier.rs b/src/test/parse-fail/keyword-match-as-identifier.rs
index 528873c1794..7c727f44da7 100644
--- a/src/test/parse-fail/keyword-match-as-identifier.rs
+++ b/src/test/parse-fail/keyword-match-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py match'
 
 fn main() {
-    let match = "foo"; //~ error: ident
+    let match = "foo"; //~ error: expected pattern, found keyword `match`
 }
diff --git a/src/test/parse-fail/keyword-mod-as-identifier.rs b/src/test/parse-fail/keyword-mod-as-identifier.rs
index b29bcbc76c3..85b4cc2e02c 100644
--- a/src/test/parse-fail/keyword-mod-as-identifier.rs
+++ b/src/test/parse-fail/keyword-mod-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py mod'
 
 fn main() {
-    let mod = "foo"; //~ error: ident
+    let mod = "foo"; //~ error: expected pattern, found keyword `mod`
 }
diff --git a/src/test/parse-fail/keyword-move-as-identifier.rs b/src/test/parse-fail/keyword-move-as-identifier.rs
new file mode 100644
index 00000000000..b785ac0058c
--- /dev/null
+++ b/src/test/parse-fail/keyword-move-as-identifier.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py move'
+
+fn main() {
+    let move = "foo"; //~ error: expected pattern, found keyword `move`
+}
diff --git a/src/test/parse-fail/keyword-mut-as-identifier.rs b/src/test/parse-fail/keyword-mut-as-identifier.rs
index b637d07d8b6..0aeca9b34ab 100644
--- a/src/test/parse-fail/keyword-mut-as-identifier.rs
+++ b/src/test/parse-fail/keyword-mut-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // compile-flags: -Z parse-only
 
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py mut'
-
 fn main() {
-    let mut = "foo"; //~ error: ident
+    let mut = "foo"; //~ error: expected identifier, found `=`
 }
diff --git a/src/test/parse-fail/keyword-pub-as-identifier.rs b/src/test/parse-fail/keyword-pub-as-identifier.rs
index 959bbfbf882..92337286970 100644
--- a/src/test/parse-fail/keyword-pub-as-identifier.rs
+++ b/src/test/parse-fail/keyword-pub-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py pub'
 
 fn main() {
-    let pub = "foo"; //~ error: ident
+    let pub = "foo"; //~ error: expected pattern, found keyword `pub`
 }
diff --git a/src/test/parse-fail/keyword-ref-as-identifier.rs b/src/test/parse-fail/keyword-ref-as-identifier.rs
index 3db6d11c2e8..a689c4eeea4 100644
--- a/src/test/parse-fail/keyword-ref-as-identifier.rs
+++ b/src/test/parse-fail/keyword-ref-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // compile-flags: -Z parse-only
 
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py ref'
-
 fn main() {
-    let ref = "foo"; //~ error: ident
+    let ref = "foo"; //~ error: expected identifier, found `=`
 }
diff --git a/src/test/parse-fail/keyword-return-as-identifier.rs b/src/test/parse-fail/keyword-return-as-identifier.rs
index df8aeba6d71..bcf7f137543 100644
--- a/src/test/parse-fail/keyword-return-as-identifier.rs
+++ b/src/test/parse-fail/keyword-return-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py return'
 
 fn main() {
-    let return = "foo"; //~ error: ident
+    let return = "foo"; //~ error: expected pattern, found keyword `return`
 }
diff --git a/src/test/parse-fail/keyword-self-as-identifier.rs b/src/test/parse-fail/keyword-self-as-identifier.rs
index 0e0d07ca6a5..f8b93a1796b 100644
--- a/src/test/parse-fail/keyword-self-as-identifier.rs
+++ b/src/test/parse-fail/keyword-self-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // compile-flags: -Z parse-only
 
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py self'
-
 fn main() {
-    let self = "foo"; //~ error: ident
+    let Self = "foo"; //~ error: expected identifier, found keyword `Self`
 }
diff --git a/src/test/parse-fail/keyword-static-as-identifier.rs b/src/test/parse-fail/keyword-static-as-identifier.rs
index d5b529af4b8..793262266a3 100644
--- a/src/test/parse-fail/keyword-static-as-identifier.rs
+++ b/src/test/parse-fail/keyword-static-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py static'
 
 fn main() {
-    let static = "foo"; //~ error: ident
+    let static = "foo"; //~ error: expected pattern, found keyword `static`
 }
diff --git a/src/test/parse-fail/keyword-struct-as-identifier.rs b/src/test/parse-fail/keyword-struct-as-identifier.rs
index 7d2160dfd29..591bd25db65 100644
--- a/src/test/parse-fail/keyword-struct-as-identifier.rs
+++ b/src/test/parse-fail/keyword-struct-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py struct'
 
 fn main() {
-    let struct = "foo"; //~ error: ident
+    let struct = "foo"; //~ error: expected pattern, found keyword `struct`
 }
diff --git a/src/test/parse-fail/keyword-super-as-identifier.rs b/src/test/parse-fail/keyword-super-as-identifier.rs
index 4d866918868..a48683a4f54 100644
--- a/src/test/parse-fail/keyword-super-as-identifier.rs
+++ b/src/test/parse-fail/keyword-super-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,8 +10,6 @@
 
 // compile-flags: -Z parse-only
 
-// This file was auto-generated using 'src/etc/generate-keyword-tests.py super'
-
 fn main() {
-    let super = "foo"; //~ error: ident
+    let super = "foo"; //~ error: expected identifier, found keyword `super`
 }
diff --git a/src/test/parse-fail/keyword-trait-as-identifier.rs b/src/test/parse-fail/keyword-trait-as-identifier.rs
index 7a8be0baa27..bdb5d264b03 100644
--- a/src/test/parse-fail/keyword-trait-as-identifier.rs
+++ b/src/test/parse-fail/keyword-trait-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py trait'
 
 fn main() {
-    let trait = "foo"; //~ error: ident
+    let trait = "foo"; //~ error: expected pattern, found keyword `trait`
 }
diff --git a/src/test/parse-fail/keyword-type-as-identifier.rs b/src/test/parse-fail/keyword-type-as-identifier.rs
index c76bea89ab4..2ba99d098de 100644
--- a/src/test/parse-fail/keyword-type-as-identifier.rs
+++ b/src/test/parse-fail/keyword-type-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py type'
 
 fn main() {
-    let type = "foo"; //~ error: ident
+    let type = "foo"; //~ error: expected pattern, found keyword `type`
 }
diff --git a/src/test/parse-fail/keyword-unsafe-as-identifier.rs b/src/test/parse-fail/keyword-unsafe-as-identifier.rs
index d3c48c6ded0..a72723e566d 100644
--- a/src/test/parse-fail/keyword-unsafe-as-identifier.rs
+++ b/src/test/parse-fail/keyword-unsafe-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py unsafe'
 
 fn main() {
-    let unsafe = "foo"; //~ error: ident
+    let unsafe = "foo"; //~ error: expected pattern, found keyword `unsafe`
 }
diff --git a/src/test/parse-fail/keyword-use-as-identifier.rs b/src/test/parse-fail/keyword-use-as-identifier.rs
index d3815c650a3..de74907ff20 100644
--- a/src/test/parse-fail/keyword-use-as-identifier.rs
+++ b/src/test/parse-fail/keyword-use-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py use'
 
 fn main() {
-    let use = "foo"; //~ error: ident
+    let use = "foo"; //~ error: expected pattern, found keyword `use`
 }
diff --git a/src/test/parse-fail/keyword-where-as-identifier.rs b/src/test/parse-fail/keyword-where-as-identifier.rs
new file mode 100644
index 00000000000..4b7c8920b13
--- /dev/null
+++ b/src/test/parse-fail/keyword-where-as-identifier.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+// This file was auto-generated using 'src/etc/generate-keyword-tests.py where'
+
+fn main() {
+    let where = "foo"; //~ error: expected pattern, found keyword `where`
+}
diff --git a/src/test/parse-fail/keyword-while-as-identifier.rs b/src/test/parse-fail/keyword-while-as-identifier.rs
index 331fdc07cc1..01793caa38a 100644
--- a/src/test/parse-fail/keyword-while-as-identifier.rs
+++ b/src/test/parse-fail/keyword-while-as-identifier.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -13,5 +13,5 @@
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py while'
 
 fn main() {
-    let while = "foo"; //~ error: ident
+    let while = "foo"; //~ error: expected pattern, found keyword `while`
 }