about summary refs log tree commit diff
path: root/src/test/compile-fail/object-lifetime-default-from-box-error.rs
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-03-09 05:54:52 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-03-09 21:43:45 +0200
commitcfb41aedd3a5e21c169a0a91dfd600e8e370d291 (patch)
tree0d4f7706eb30cf32e8114ef3cabe026bc6850c60 /src/test/compile-fail/object-lifetime-default-from-box-error.rs
parent74bc7fda8c1cdb8bbf29d9901cbfc31a2e0da86b (diff)
downloadrust-cfb41aedd3a5e21c169a0a91dfd600e8e370d291.tar.gz
rust-cfb41aedd3a5e21c169a0a91dfd600e8e370d291.zip
Use subtyping on the target of unsizing coercions.
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.rs4
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 dd94dfe1e08..c0dd5200f6c 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 lifetime bound not satisfied
+    ss.r //~ ERROR cannot infer an appropriate lifetime
 }
 
 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 lifetime bound not satisfied
+    ss.r = b; //~ ERROR cannot infer an appropriate lifetime
 }
 
 fn main() {