diff options
| author | bors <bors@rust-lang.org> | 2015-03-02 20:26:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-02 20:26:39 +0000 |
| commit | 2ca6eaedae9ec4bff2a63f81f473aba653e46ac5 (patch) | |
| tree | c0f79ec53e9f9ca46755b5ddccc42e67ebbb69a7 /src/test | |
| parent | 1cc8b6ec664f30b43f75551e95299d943c8a4e6a (diff) | |
| parent | c4b1500fec44c4ed967542fda3cd9c104addbb80 (diff) | |
| download | rust-2ca6eaedae9ec4bff2a63f81f473aba653e46ac5.tar.gz rust-2ca6eaedae9ec4bff2a63f81f473aba653e46ac5.zip | |
Auto merge of #22963 - Manishearth:rollup, r=Manishearth
Diffstat (limited to 'src/test')
5 files changed, 10 insertions, 7 deletions
diff --git a/src/test/compile-fail/issue-4335.rs b/src/test/compile-fail/issue-4335.rs index d0da51373d9..85298e4c6e0 100644 --- a/src/test/compile-fail/issue-4335.rs +++ b/src/test/compile-fail/issue-4335.rs @@ -14,7 +14,9 @@ fn id<T>(t: T) -> T { t } fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> { - id(box || *v) //~ ERROR cannot infer + id(box || *v) + //~^ ERROR `v` does not live long enough + //~| ERROR cannot move out of borrowed content } fn main() { diff --git a/src/test/compile-fail/regions-proc-bound-capture.rs b/src/test/compile-fail/regions-proc-bound-capture.rs index 7ea4d1c7507..cc33d112417 100644 --- a/src/test/compile-fail/regions-proc-bound-capture.rs +++ b/src/test/compile-fail/regions-proc-bound-capture.rs @@ -18,7 +18,7 @@ fn borrowed_proc<'a>(x: &'a isize) -> Box<FnMut()->(isize) + 'a> { fn static_proc(x: &isize) -> Box<FnMut()->(isize) + 'static> { // This is illegal, because the region bound on `proc` is 'static. - box move|| { *x } //~ ERROR cannot infer + box move|| { *x } //~ ERROR captured variable `x` does not outlive the enclosing closure } fn main() { } diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs index 97b51fdb325..c9b378d1df2 100644 --- a/src/test/compile-fail/regions-steal-closure.rs +++ b/src/test/compile-fail/regions-steal-closure.rs @@ -20,9 +20,9 @@ fn box_it<'r>(x: Box<FnMut() + 'r>) -> closure_box<'r> { } fn main() { - let cl_box = { + let mut cl_box = { let mut i = 3; - box_it(box || i += 1) //~ ERROR cannot infer + box_it(box || i += 1) //~ ERROR `i` does not live long enough }; cl_box.cl.call_mut(()); } diff --git a/src/test/compile-fail/send-is-not-static-ensures-scoping.rs b/src/test/compile-fail/send-is-not-static-ensures-scoping.rs index abbcd7e4590..fe03ca8353d 100755 --- a/src/test/compile-fail/send-is-not-static-ensures-scoping.rs +++ b/src/test/compile-fail/send-is-not-static-ensures-scoping.rs @@ -13,9 +13,10 @@ use std::thread; fn main() { let bad = { let x = 1; - let y = &x; + let y = &x; //~ ERROR `x` does not live long enough - thread::scoped(|| { //~ ERROR cannot infer an appropriate lifetime + thread::scoped(|| { + //~^ ERROR `y` does not live long enough let _z = y; }) }; diff --git a/src/test/compile-fail/unboxed-closure-region.rs b/src/test/compile-fail/unboxed-closure-region.rs index 59c84953718..5f4bf0d33be 100644 --- a/src/test/compile-fail/unboxed-closure-region.rs +++ b/src/test/compile-fail/unboxed-closure-region.rs @@ -15,6 +15,6 @@ fn main() { let _f = { let x = 0_usize; - || x //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements + || x //~ ERROR `x` does not live long enough }; } |
