Register new snapshots

This commit is contained in:
Alex Crichton 2014-04-07 13:30:48 -07:00
parent c83afb9719
commit c3ea3e439f
74 changed files with 194 additions and 208 deletions

View file

@ -13,7 +13,7 @@
// part of issue-6919.rs
struct C<'a> {
pub k: 'a ||,
pub k: ||: 'a,
}
fn no_op() { }

View file

@ -9,11 +9,11 @@
// except according to those terms.
struct X {
field: 'static ||:Send,
field: ||:'static + Send,
}
fn foo(blk: 'static ||:) -> X {
return X { field: blk }; //~ ERROR expected bounds `Send` but found no bounds
fn foo(blk: ||:'static) -> X {
return X { field: blk }; //~ ERROR expected bounds `'static+Send`
}
fn main() {

View file

@ -10,7 +10,7 @@
fn id<T>(t: T) -> T { t }
fn f<'r, T>(v: &'r T) -> 'r || -> T {
fn f<'r, T>(v: &'r T) -> ||: 'r -> T {
id(|| *v) //~ ERROR cannot infer
}

View file

@ -10,7 +10,7 @@
fn foopy() {}
static f: 'static || = foopy; //~ ERROR found extern fn
static f: ||: 'static = foopy; //~ ERROR found extern fn
fn main () {
f();

View file

@ -14,8 +14,8 @@ fn foo(_x: @uint) {}
fn main() {
let x = @3u;
let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
let _: proc:Send() = proc() foo(x); //~ ERROR does not fulfill `Send`
let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send`
let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send`
let _: proc():Send = proc() foo(x); //~ ERROR does not fulfill `Send`
let _: proc() = proc() foo(x);
}

View file

@ -16,7 +16,7 @@ struct R<'a> {
// This struct is needed to create the
// otherwise infinite type of a fn that
// accepts itself as argument:
c: 'a |&R, bool|
c: |&R, bool|: 'a
}
fn innocent_looking_victim() {

View file

@ -13,13 +13,13 @@ fn is_freeze<T: Share>() {}
fn is_static<T: 'static>() {}
fn main() {
is_send::<proc:()>();
is_send::<proc()>();
//~^ ERROR: instantiating a type parameter with an incompatible type
is_freeze::<proc:()>();
is_freeze::<proc()>();
//~^ ERROR: instantiating a type parameter with an incompatible type
is_static::<proc:()>();
is_static::<proc()>();
//~^ ERROR: instantiating a type parameter with an incompatible type
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn env<'a>(_: &'a uint, blk: |p: 'a |||) {
fn env<'a>(_: &'a uint, blk: |p: ||: 'a|) {
// Test that the closure here cannot be assigned
// the lifetime `'a`, which outlives the current
// block.
@ -21,7 +21,7 @@ fn env<'a>(_: &'a uint, blk: |p: 'a |||) {
blk(|| *statep = 1); //~ ERROR cannot infer
}
fn no_env_no_for<'a>(_: &'a uint, blk: |p: 'a |||) {
fn no_env_no_for<'a>(_: &'a uint, blk: |p: |||: 'a) {
// Test that a closure with no free variables CAN
// outlive the block in which it is created.
//

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn wants_static_fn(_x: 'static ||) {}
fn wants_static_fn(_x: ||: 'static) {}
fn main() {
let i = 3;

View file

@ -9,15 +9,15 @@
// except according to those terms.
struct parameterized1<'a> {
g: 'a ||
g: ||: 'a
}
struct not_parameterized1 {
g: 'static ||
g: ||: 'static
}
struct not_parameterized2 {
g: 'static ||
g: ||: 'static
}
fn take1(p: parameterized1) -> parameterized1 { p }

View file

@ -11,7 +11,7 @@
#![feature(managed_boxes)]
struct invariant<'a> {
f: 'static |x: &mut &'a int|
f: |x: &mut &'a int|: 'static
}
fn to_same_lifetime<'r>(bi: invariant<'r>) {

View file

@ -11,7 +11,7 @@
#![feature(managed_boxes)]
struct invariant<'a> {
f: 'static || -> &mut &'a int
f: ||: 'static -> &mut &'a int
}
fn to_same_lifetime<'r>(bi: invariant<'r>) {

View file

@ -14,12 +14,12 @@ struct direct<'a> {
struct indirect1 {
// Here the lifetime parameter of direct is bound by the fn()
g: 'static |direct|
g: |direct|: 'static
}
struct indirect2<'a> {
// But here it is set to 'a
g: 'static |direct<'a>|
g: |direct<'a>|: 'static
}
fn take_direct(p: direct) -> direct { p } //~ ERROR mismatched types

View file

@ -9,10 +9,10 @@
// except according to those terms.
struct closure_box<'a> {
cl: 'a ||
cl: ||: 'a
}
fn box_it<'r>(x: 'r ||) -> closure_box<'r> {
fn box_it<'r>(x: ||: 'r) -> closure_box<'r> {
closure_box {cl: x}
}

View file

@ -26,7 +26,7 @@ struct WindowCallbacks<'a> {
pos_callback: Option<WindowPosCallback<'a>>,
}
pub type WindowPosCallback<'a> = 'a |&Window, i32, i32|;
pub type WindowPosCallback<'a> = |&Window, i32, i32|: 'a;
fn main() {
let x = WindowCallbacks { pos_callback: None };

View file

@ -18,7 +18,7 @@ fn failfn() {
fn main() {
let y = ~0;
let x: @proc:Send() = @(proc() {
let x: @proc():Send = @(proc() {
println!("{:?}", y.clone());
});
failfn();

View file

@ -16,7 +16,7 @@ fn main() {
let cheese = ~"roquefort";
let carrots = @~"crunchy";
let result: 'static |@~str, |~str|| = (|tasties, macerate| {
let result: |@~str, |~str||: 'static = (|tasties, macerate| {
macerate((*tasties).clone());
});
result(carrots, |food| {

View file

@ -18,7 +18,7 @@ struct Pair {
pub fn main() {
let z = ~Pair { a : 10, b : 12};
let f: proc:Send() = proc() {
let f: proc():Send = proc() {
assert_eq!(z.a, 10);
assert_eq!(z.b, 12);
};

View file

@ -61,7 +61,7 @@ fn bar<'b>() {
foo::<proc<'a>(int, f32, &'a int):'static + Share -> &'a int>();
// issue #11209
let _: 'b ||; // for comparison
let _: ||: 'b; // for comparison
let _: <'a> ||;
let _: Option<||:'b>;
@ -69,7 +69,7 @@ fn bar<'b>() {
let _: Option< <'a>||>;
// issue #11210
let _: 'static ||;
let _: ||: 'static;
}
pub fn main() {

View file

@ -9,5 +9,5 @@
// except according to those terms.
pub fn main() {
let early_error: 'static |&str| -> ! = |_msg| { fail!() };
let early_error: |&str|: 'static -> ! = |_msg| { fail!() };
}

View file

@ -12,13 +12,13 @@ use std::task;
static generations: uint = 1024+256+128+49;
fn spawn(f: proc:Send()) {
fn spawn(f: proc():Send) {
let mut t = task::task();
t.opts.stack_size = Some(32 * 1024);
t.spawn(f);
}
fn child_no(x: uint) -> proc:Send() {
fn child_no(x: uint) -> proc():Send {
proc() {
if x < generations {
spawn(child_no(x+1));

View file

@ -11,7 +11,7 @@
use std::task;
type RingBuffer = Vec<f64> ;
type SamplesFn = proc:Send(samples: &RingBuffer);
type SamplesFn = proc(samples: &RingBuffer):Send;
enum Msg
{

View file

@ -12,10 +12,10 @@
struct A { a: ~int }
fn foo() -> 'static || -> int {
fn foo() -> ||: 'static -> int {
let k = ~22;
let _u = A {a: k.clone()};
let result: 'static || -> int = || 22;
let result: ||: 'static -> int = || 22;
result
}

View file

@ -17,18 +17,18 @@ fn is_static<T: 'static>() {}
pub fn main() {
foo::<proc()>();
foo::<proc:()>();
foo::<proc:Send()>();
foo::<proc:Send + Share()>();
foo::<proc:'static + Send + Share()>();
foo::<proc()>();
foo::<proc():Send>();
foo::<proc():Send + Share>();
foo::<proc():'static + Send + Share>();
is_send::<proc:Send()>();
is_freeze::<proc:Share()>();
is_static::<proc:'static()>();
is_send::<proc():Send>();
is_freeze::<proc():Share>();
is_static::<proc():'static>();
let a = 3;
bar::<proc:()>(proc() {
bar::<proc():>(proc() {
let b = &a;
println!("{}", *b);
});

View file

@ -18,7 +18,7 @@ fn test05_start(f: proc(int)) {
fn test05() {
let three = ~3;
let fn_to_send: proc:Send(int) = proc(n) {
let fn_to_send: proc(int):Send = proc(n) {
println!("{}", *three + n); // will copy x into the closure
assert_eq!(*three, 3);
};

View file

@ -35,7 +35,7 @@ fn test_tempdir() {
fn test_rm_tempdir() {
let (tx, rx) = channel();
let f: proc:Send() = proc() {
let f: proc():Send = proc() {
let tmp = TempDir::new("test_rm_tempdir").unwrap();
tx.send(tmp.path().clone());
fail!("fail to unwind past `tmp`");
@ -46,7 +46,7 @@ fn test_rm_tempdir() {
let tmp = TempDir::new("test_rm_tempdir").unwrap();
let path = tmp.path().clone();
let f: proc:Send() = proc() {
let f: proc():Send = proc() {
let _tmp = tmp;
fail!("fail to unwind past `tmp`");
};

View file

@ -19,10 +19,10 @@ enum maybe_pointy {
struct Pointy {
a : maybe_pointy,
d : proc:Send() -> uint,
d : proc():Send -> uint,
}
fn make_uniq_closure<A:Send>(a: A) -> proc:Send() -> uint {
fn make_uniq_closure<A:Send>(a: A) -> proc():Send -> uint {
proc() { &a as *A as uint }
}

View file

@ -20,7 +20,7 @@ enum maybe_pointy {
struct Pointy {
a : maybe_pointy,
c : ~int,
d : proc:Send()->(),
d : proc():Send->(),
}
fn empty_pointy() -> @RefCell<Pointy> {