diff options
| author | Agustin Chiappe Berrini <jnieve@gmail.com> | 2017-12-06 04:28:01 -0500 |
|---|---|---|
| committer | Agustin Chiappe Berrini <jnieve@gmail.com> | 2017-12-06 04:28:01 -0500 |
| commit | 65ccf24ce8e51b199d60d06ad41ea35f4cdee15c (patch) | |
| tree | 733ff2b5a3998cc91517bb2aa1fae3ea5f42ad7c /src/test/parse-fail | |
| parent | a2899408dd162bfe349e7ff8bceaee60b34e77cc (diff) | |
| download | rust-65ccf24ce8e51b199d60d06ad41ea35f4cdee15c.tar.gz rust-65ccf24ce8e51b199d60d06ad41ea35f4cdee15c.zip | |
and refactor to just move the checking
Diffstat (limited to 'src/test/parse-fail')
| -rw-r--r-- | src/test/parse-fail/issue-10412.rs | 34 | ||||
| -rw-r--r-- | src/test/parse-fail/lifetime-no-keyword.rs | 18 |
2 files changed, 0 insertions, 52 deletions
diff --git a/src/test/parse-fail/issue-10412.rs b/src/test/parse-fail/issue-10412.rs deleted file mode 100644 index d723d94c02c..00000000000 --- a/src/test/parse-fail/issue-10412.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2013 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 -Z continue-parse-after-error - - -trait Serializable<'self, T> { //~ ERROR lifetimes cannot use keyword names - fn serialize(val : &'self T) -> Vec<u8> ; //~ ERROR lifetimes cannot use keyword names - fn deserialize(repr : &[u8]) -> &'self T; //~ ERROR lifetimes cannot use keyword names -} - -impl<'self> Serializable<str> for &'self str { //~ ERROR lifetimes cannot use keyword names - //~^ ERROR lifetimes cannot use keyword names - fn serialize(val : &'self str) -> Vec<u8> { //~ ERROR lifetimes cannot use keyword names - vec![1] - } - fn deserialize(repr: &[u8]) -> &'self str { //~ ERROR lifetimes cannot use keyword names - "hi" - } -} - -fn main() { - println!("hello"); - let x = "foo".to_string(); - let y = x; - println!("{}", y); -} diff --git a/src/test/parse-fail/lifetime-no-keyword.rs b/src/test/parse-fail/lifetime-no-keyword.rs deleted file mode 100644 index a8771ae93af..00000000000 --- a/src/test/parse-fail/lifetime-no-keyword.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2013 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 -Z continue-parse-after-error - -fn foo<'a>(a: &'a isize) { } -fn bar(a: &'static isize) { } -fn baz(a: &'let isize) { } //~ ERROR lifetimes cannot use keyword names -fn zab(a: &'self isize) { } //~ ERROR lifetimes cannot use keyword names - -fn main() { } |
