diff options
| author | John Gallagher <jgallagher@bignerdranch.com> | 2014-10-07 22:19:02 -0400 |
|---|---|---|
| committer | John Gallagher <jgallagher@bignerdranch.com> | 2014-10-07 22:19:02 -0400 |
| commit | 3db9070e9c2a88cf88766d277ffc03ab65e72dec (patch) | |
| tree | 459979c0d6f62ab96934b42ee6c4138100ee3cbf | |
| parent | 4d190b12350a921c1940393ede51c81c5cdf3075 (diff) | |
| download | rust-3db9070e9c2a88cf88766d277ffc03ab65e72dec.tar.gz rust-3db9070e9c2a88cf88766d277ffc03ab65e72dec.zip | |
Add tests for new reserved keywords `abstract`,`final`,`override`
| -rw-r--r-- | src/test/compile-fail/keyword-abstract.rs | 13 | ||||
| -rw-r--r-- | src/test/compile-fail/keyword-final.rs | 13 | ||||
| -rw-r--r-- | src/test/compile-fail/keyword-override.rs | 13 |
3 files changed, 39 insertions, 0 deletions
diff --git a/src/test/compile-fail/keyword-abstract.rs b/src/test/compile-fail/keyword-abstract.rs new file mode 100644 index 00000000000..1f1360eac00 --- /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 <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. + +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 00000000000..305ef0ef075 --- /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 <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. + +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 00000000000..f70e6b92610 --- /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 <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. + +fn main() { + let override = (); //~ ERROR `override` is a reserved keyword +} |
