diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-03-10 07:02:27 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-03-31 09:51:17 -0400 |
| commit | 4b0edb96d080fadccc542dad50e6576c8e11bd85 (patch) | |
| tree | 2265524607aa0249fe2dcc21ba5ce3493dd67e73 /src/test | |
| parent | 0939837867e77f478dcd3735f3a6ce8823f5fd48 (diff) | |
| download | rust-4b0edb96d080fadccc542dad50e6576c8e11bd85.tar.gz rust-4b0edb96d080fadccc542dad50e6576c8e11bd85.zip | |
Combine `try` and `commit_if_ok` and make some details of inference
context private.
Diffstat (limited to 'src/test')
4 files changed, 6 insertions, 6 deletions
diff --git a/src/test/compile-fail/object-lifetime-default-elision.rs b/src/test/compile-fail/object-lifetime-default-elision.rs index 0077d10e6ca..4fba45e2a66 100644 --- a/src/test/compile-fail/object-lifetime-default-elision.rs +++ b/src/test/compile-fail/object-lifetime-default-elision.rs @@ -81,8 +81,8 @@ fn load3<'a,'b>(ss: &'a SomeTrait) -> &'b SomeTrait { // which fails to type check. ss - //~^ ERROR cannot infer - //~| ERROR mismatched types + //~^ ERROR lifetime of the source pointer does not outlive lifetime bound + //~| ERROR cannot infer } fn main() { diff --git a/src/test/compile-fail/object-lifetime-default-from-box-error.rs b/src/test/compile-fail/object-lifetime-default-from-box-error.rs index 70752cbfda1..7fae530984f 100644 --- a/src/test/compile-fail/object-lifetime-default-from-box-error.rs +++ b/src/test/compile-fail/object-lifetime-default-from-box-error.rs @@ -25,7 +25,7 @@ fn load(ss: &mut SomeStruct) -> Box<SomeTrait> { // `Box<SomeTrait>` defaults to a `'static` bound, so this return // is illegal. - ss.r //~ ERROR mismatched types + ss.r //~ ERROR lifetime of the source pointer does not outlive lifetime bound } fn store(ss: &mut SomeStruct, b: Box<SomeTrait>) { @@ -38,7 +38,7 @@ fn store(ss: &mut SomeStruct, b: Box<SomeTrait>) { fn store1<'b>(ss: &mut SomeStruct, b: Box<SomeTrait+'b>) { // Here we override the lifetimes explicitly, and so naturally we get an error. - ss.r = b; //~ ERROR mismatched types + ss.r = b; //~ ERROR lifetime of the source pointer does not outlive lifetime bound } fn main() { diff --git a/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs b/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs index 0f8bc6d684f..10b883d4dc8 100644 --- a/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs +++ b/src/test/compile-fail/regions-close-over-type-parameter-multiple.rs @@ -27,7 +27,7 @@ fn make_object_good2<'a,'b,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'b> { fn make_object_bad<'a,'b,'c,A:SomeTrait+'a+'b>(v: A) -> Box<SomeTrait+'c> { // A outlives 'a AND 'b...but not 'c. - box v as Box<SomeTrait+'a> //~ ERROR mismatched types + box v as Box<SomeTrait+'a> //~ ERROR lifetime of the source pointer does not outlive } fn main() { diff --git a/src/test/compile-fail/regions-trait-object-subtyping.rs b/src/test/compile-fail/regions-trait-object-subtyping.rs index 8d05cb67e77..f3722690ef8 100644 --- a/src/test/compile-fail/regions-trait-object-subtyping.rs +++ b/src/test/compile-fail/regions-trait-object-subtyping.rs @@ -22,7 +22,7 @@ fn foo2<'a:'b,'b>(x: &'b mut (Dummy+'a)) -> &'b mut (Dummy+'b) { fn foo3<'a,'b>(x: &'a mut Dummy) -> &'b mut Dummy { // Without knowing 'a:'b, we can't coerce - x //~ ERROR mismatched types + x //~ ERROR lifetime of the source pointer does not outlive //~^ ERROR cannot infer } |
