diff --git a/src/test/compile-fail/keyword-abstract.rs b/src/test/compile-fail/keyword-abstract.rs new file mode 100644 index 000000000000..1f1360eac007 --- /dev/null +++ b/src/test/compile-fail/keyword-abstract.rs @@ -0,0 +1,13 @@ +// Copyright 2014 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let abstract = (); //~ ERROR `abstract` is a reserved keyword +} diff --git a/src/test/compile-fail/keyword-final.rs b/src/test/compile-fail/keyword-final.rs new file mode 100644 index 000000000000..305ef0ef075f --- /dev/null +++ b/src/test/compile-fail/keyword-final.rs @@ -0,0 +1,13 @@ +// Copyright 2014 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let final = (); //~ ERROR `final` is a reserved keyword +} diff --git a/src/test/compile-fail/keyword-override.rs b/src/test/compile-fail/keyword-override.rs new file mode 100644 index 000000000000..f70e6b926105 --- /dev/null +++ b/src/test/compile-fail/keyword-override.rs @@ -0,0 +1,13 @@ +// Copyright 2014 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let override = (); //~ ERROR `override` is a reserved keyword +}