From 65ccf24ce8e51b199d60d06ad41ea35f4cdee15c Mon Sep 17 00:00:00 2001 From: Agustin Chiappe Berrini Date: Wed, 6 Dec 2017 04:28:01 -0500 Subject: and refactor to just move the checking --- src/test/parse-fail/issue-10412.rs | 34 ------------------------------ src/test/parse-fail/lifetime-no-keyword.rs | 18 ---------------- 2 files changed, 52 deletions(-) delete mode 100644 src/test/parse-fail/issue-10412.rs delete mode 100644 src/test/parse-fail/lifetime-no-keyword.rs (limited to 'src/test/parse-fail') 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 or the MIT license -// , 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 ; //~ ERROR lifetimes cannot use keyword names - fn deserialize(repr : &[u8]) -> &'self T; //~ ERROR lifetimes cannot use keyword names -} - -impl<'self> Serializable for &'self str { //~ ERROR lifetimes cannot use keyword names - //~^ ERROR lifetimes cannot use keyword names - fn serialize(val : &'self str) -> Vec { //~ 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 or the MIT license -// , 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() { } -- cgit 1.4.1-3-g733a5