Temporary bootstrapping hack: introduce syntax for r egion 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.
This commit is contained in:
Niko Matsakis 2014-08-05 22:59:24 -04:00
parent 1a53c00117
commit fcab98038c
19 changed files with 241 additions and 81 deletions

View file

@ -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() { }

View file

@ -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() { }