about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-07 11:31:05 +0000
committerbors <bors@rust-lang.org>2014-08-07 11:31:05 +0000
commit8a02304a44bc9d1939b847b824006fcde99ec9e6 (patch)
tree345deba110cec778935c4d2fa1b7f9150c90f7c3 /src/test
parent1a53c001170f8084ce850498d5e8f22b5e7da72c (diff)
parentfcab98038c3b466d9ecd00b0f27e9c748e7acbde (diff)
downloadrust-8a02304a44bc9d1939b847b824006fcde99ec9e6.tar.gz
rust-8a02304a44bc9d1939b847b824006fcde99ec9e6.zip
auto merge of #16318 : nikomatsakis/rust/issue-5723-bootstrap-2, r=pnkfelix
Introduce syntax for lifetime bounds like `'b:'a`, meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is required.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/regions-bound-lists-feature-gate-2.rs18
-rw-r--r--src/test/run-pass/regions-bound-lists-feature-gate-2.rs20
2 files changed, 38 insertions, 0 deletions
diff --git a/src/test/compile-fail/regions-bound-lists-feature-gate-2.rs b/src/test/compile-fail/regions-bound-lists-feature-gate-2.rs
new file mode 100644
index 00000000000..0f79716f370
--- /dev/null
+++ b/src/test/compile-fail/regions-bound-lists-feature-gate-2.rs
@@ -0,0 +1,18 @@
+// 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.
+
+// ignore-pretty
+
+trait Foo { }
+
+fn foo<'a, 'b:'a>() { //~ ERROR region bounds require `issue_5723_bootstrap`
+}
+
+pub fn main() { }
diff --git a/src/test/run-pass/regions-bound-lists-feature-gate-2.rs b/src/test/run-pass/regions-bound-lists-feature-gate-2.rs
new file mode 100644
index 00000000000..0a95a89d57c
--- /dev/null
+++ b/src/test/run-pass/regions-bound-lists-feature-gate-2.rs
@@ -0,0 +1,20 @@
+// 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.
+
+// ignore-pretty
+
+#![feature(issue_5723_bootstrap)]
+
+trait Foo { }
+
+fn foo<'a, 'b, 'c:'a+'b, 'd>() {
+}
+
+pub fn main() { }