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/compile-fail/object-lifetime-default-from-box-error.rs | |
| 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/compile-fail/object-lifetime-default-from-box-error.rs')
| -rw-r--r-- | src/test/compile-fail/object-lifetime-default-from-box-error.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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() { |
