diff options
| -rw-r--r-- | src/librustc/middle/kind.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/kindck-owned-trait-scoped.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/kindck-owned-trait.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/middle/kind.rs b/src/librustc/middle/kind.rs index b988a88a901..6315986d1a6 100644 --- a/src/librustc/middle/kind.rs +++ b/src/librustc/middle/kind.rs @@ -421,7 +421,7 @@ pub fn check_durable(tcx: ty::ctxt, ty: ty::t, sp: span) -> bool { match ty::get(ty).sty { ty::ty_param(*) => { tcx.sess.span_err(sp, "value may contain borrowed \ - pointers; use `'static` bound"); + pointers; add `'static` bound"); } _ => { tcx.sess.span_err(sp, "value may contain borrowed \ diff --git a/src/test/compile-fail/kindck-owned-trait-scoped.rs b/src/test/compile-fail/kindck-owned-trait-scoped.rs index dc3717085ca..808bfba8298 100644 --- a/src/test/compile-fail/kindck-owned-trait-scoped.rs +++ b/src/test/compile-fail/kindck-owned-trait-scoped.rs @@ -37,7 +37,7 @@ fn to_foo_2<T:Copy>(t: T) -> @foo { // Not OK---T may contain borrowed ptrs and it is going to escape // as part of the returned foo value struct F<T> { f: T } - @F {f:t} as @foo //~ ERROR value may contain borrowed pointers; use `'static` bound + @F {f:t} as @foo //~ ERROR value may contain borrowed pointers; add `'static` bound } fn to_foo_3<T:Copy + 'static>(t: T) -> @foo { diff --git a/src/test/compile-fail/kindck-owned-trait.rs b/src/test/compile-fail/kindck-owned-trait.rs index c61bbc69be5..857c71db72c 100644 --- a/src/test/compile-fail/kindck-owned-trait.rs +++ b/src/test/compile-fail/kindck-owned-trait.rs @@ -11,7 +11,7 @@ trait foo { fn foo(&self); } fn to_foo<T:Copy + foo>(t: T) -> @foo { - @t as @foo //~ ERROR value may contain borrowed pointers; use `'static` bound + @t as @foo //~ ERROR value may contain borrowed pointers; add `'static` bound } fn to_foo2<T:Copy + foo + 'static>(t: T) -> @foo { |
