diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-04-07 13:30:48 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-08 00:03:11 -0700 |
| commit | c3ea3e439fbc5251279d914a95cd8344556982cb (patch) | |
| tree | c179b27b1d04dd7bfa17ab59b695c91fcd64320f /src/test | |
| parent | c83afb9719ad6e2ae7d819b8096524e1147c4065 (diff) | |
Register new snapshots
Diffstat (limited to 'src/test')
28 files changed, 51 insertions, 51 deletions
diff --git a/src/test/auxiliary/iss.rs b/src/test/auxiliary/iss.rs index 28437c4585d..96cb6c3273a 100644 --- a/src/test/auxiliary/iss.rs +++ b/src/test/auxiliary/iss.rs @@ -13,7 +13,7 @@ // part of issue-6919.rs struct C<'a> { - pub k: 'a ||, + pub k: ||: 'a, } fn no_op() { } diff --git a/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs b/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs index e5898b33e77..951354d964d 100644 --- a/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs +++ b/src/test/compile-fail/closure-bounds-cant-promote-superkind-in-struct.rs @@ -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() { diff --git a/src/test/compile-fail/issue-4335.rs b/src/test/compile-fail/issue-4335.rs index 8e4aa799d1f..08ff575f63b 100644 --- a/src/test/compile-fail/issue-4335.rs +++ b/src/test/compile-fail/issue-4335.rs @@ -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 } diff --git a/src/test/compile-fail/issue-4523.rs b/src/test/compile-fail/issue-4523.rs index 952a528b427..026327a358a 100644 --- a/src/test/compile-fail/issue-4523.rs +++ b/src/test/compile-fail/issue-4523.rs @@ -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(); diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 51687fffd11..8fe9694b0cb 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -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); } diff --git a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs index 03b9b7ba78f..e9053b46bbb 100644 --- a/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs +++ b/src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.rs @@ -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() { diff --git a/src/test/compile-fail/proc-bounds.rs b/src/test/compile-fail/proc-bounds.rs index e4d2c801070..0875212b7de 100644 --- a/src/test/compile-fail/proc-bounds.rs +++ b/src/test/compile-fail/proc-bounds.rs @@ -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 } diff --git a/src/test/compile-fail/regionck-closure-lifetimes.rs b/src/test/compile-fail/regionck-closure-lifetimes.rs index ec51f2dc212..e9ef23ebe09 100644 --- a/src/test/compile-fail/regionck-closure-lifetimes.rs +++ b/src/test/compile-fail/regionck-closure-lifetimes.rs @@ -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. // diff --git a/src/test/compile-fail/regions-freevar.rs b/src/test/compile-fail/regions-freevar.rs index 68920065d19..285e11fa9a2 100644 --- a/src/test/compile-fail/regions-freevar.rs +++ b/src/test/compile-fail/regions-freevar.rs @@ -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; diff --git a/src/test/compile-fail/regions-infer-at-fn-not-param.rs b/src/test/compile-fail/regions-infer-at-fn-not-param.rs index ad6d1b2742d..4c883656d61 100644 --- a/src/test/compile-fail/regions-infer-at-fn-not-param.rs +++ b/src/test/compile-fail/regions-infer-at-fn-not-param.rs @@ -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 } diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs index ae1cbcf3e68..53d013c0e6b 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs @@ -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>) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs index 096d8912f8b..edab5b21991 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs @@ -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>) { diff --git a/src/test/compile-fail/regions-infer-not-param.rs b/src/test/compile-fail/regions-infer-not-param.rs index 6596a1d8c23..86f98d5cc35 100644 --- a/src/test/compile-fail/regions-infer-not-param.rs +++ b/src/test/compile-fail/regions-infer-not-param.rs @@ -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 diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs index f80e5616bd5..7ffc6a75cff 100644 --- a/src/test/compile-fail/regions-steal-closure.rs +++ b/src/test/compile-fail/regions-steal-closure.rs @@ -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} } diff --git a/src/test/debug-info/recursive-enum.rs b/src/test/debug-info/recursive-enum.rs index 8279119a09c..c02d3f0e076 100644 --- a/src/test/debug-info/recursive-enum.rs +++ b/src/test/debug-info/recursive-enum.rs @@ -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 }; diff --git a/src/test/run-fail/unwind-box-fn-unique.rs b/src/test/run-fail/unwind-box-fn-unique.rs index 4a6f37c91b7..da4210b9fa8 100644 --- a/src/test/run-fail/unwind-box-fn-unique.rs +++ b/src/test/run-fail/unwind-box-fn-unique.rs @@ -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(); diff --git a/src/test/run-fail/unwind-lambda.rs b/src/test/run-fail/unwind-lambda.rs index ee570fa2e95..f544d474c4f 100644 --- a/src/test/run-fail/unwind-lambda.rs +++ b/src/test/run-fail/unwind-lambda.rs @@ -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| { diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs index 4f3db3a5f77..038c0418ecb 100644 --- a/src/test/run-pass/clone-with-exterior.rs +++ b/src/test/run-pass/clone-with-exterior.rs @@ -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); }; diff --git a/src/test/run-pass/closure-syntax.rs b/src/test/run-pass/closure-syntax.rs index 798808a1572..983cd00f39c 100644 --- a/src/test/run-pass/closure-syntax.rs +++ b/src/test/run-pass/closure-syntax.rs @@ -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() { diff --git a/src/test/run-pass/issue-1516.rs b/src/test/run-pass/issue-1516.rs index f3ffed7dc7b..3aaa480d776 100644 --- a/src/test/run-pass/issue-1516.rs +++ b/src/test/run-pass/issue-1516.rs @@ -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!() }; } diff --git a/src/test/run-pass/issue-2190-1.rs b/src/test/run-pass/issue-2190-1.rs index d04717e380b..c8735e79e50 100644 --- a/src/test/run-pass/issue-2190-1.rs +++ b/src/test/run-pass/issue-2190-1.rs @@ -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)); diff --git a/src/test/run-pass/issue-3609.rs b/src/test/run-pass/issue-3609.rs index 1f1de9ddb9b..95bbf77024c 100644 --- a/src/test/run-pass/issue-3609.rs +++ b/src/test/run-pass/issue-3609.rs @@ -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 { diff --git a/src/test/run-pass/last-use-in-cap-clause.rs b/src/test/run-pass/last-use-in-cap-clause.rs index b72ef59075c..ec26dc0b3ed 100644 --- a/src/test/run-pass/last-use-in-cap-clause.rs +++ b/src/test/run-pass/last-use-in-cap-clause.rs @@ -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 } diff --git a/src/test/run-pass/proc-bounds.rs b/src/test/run-pass/proc-bounds.rs index 900e266584b..c103e087363 100644 --- a/src/test/run-pass/proc-bounds.rs +++ b/src/test/run-pass/proc-bounds.rs @@ -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); }); diff --git a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs index ac3dd80c383..a62c1ec3314 100644 --- a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs +++ b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs @@ -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); }; diff --git a/src/test/run-pass/tempfile.rs b/src/test/run-pass/tempfile.rs index d11e879b494..437d6faea38 100644 --- a/src/test/run-pass/tempfile.rs +++ b/src/test/run-pass/tempfile.rs @@ -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`"); }; diff --git a/src/test/run-pass/uniq-cc-generic.rs b/src/test/run-pass/uniq-cc-generic.rs index 78fa7520f33..3c164d3e2da 100644 --- a/src/test/run-pass/uniq-cc-generic.rs +++ b/src/test/run-pass/uniq-cc-generic.rs @@ -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 } } diff --git a/src/test/run-pass/uniq-cc.rs b/src/test/run-pass/uniq-cc.rs index aa048a239db..6c273199c6f 100644 --- a/src/test/run-pass/uniq-cc.rs +++ b/src/test/run-pass/uniq-cc.rs @@ -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> { |
