Skip to content

Commit 308774e

Browse files
committed
auto merge of #6340 : graydon/rust/issue-2994, r=graydon
2 parents 9bfe296 + 2bed5dc commit 308774e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustc/middle/kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ pub fn check_durable(tcx: ty::ctxt, ty: ty::t, sp: span) -> bool {
421421
match ty::get(ty).sty {
422422
ty::ty_param(*) => {
423423
tcx.sess.span_err(sp, "value may contain borrowed \
424-
pointers; use `'static` bound");
424+
pointers; add `'static` bound");
425425
}
426426
_ => {
427427
tcx.sess.span_err(sp, "value may contain borrowed \

src/test/compile-fail/kindck-owned-trait-scoped.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn to_foo_2<T:Copy>(t: T) -> @foo {
3737
// Not OK---T may contain borrowed ptrs and it is going to escape
3838
// as part of the returned foo value
3939
struct F<T> { f: T }
40-
@F {f:t} as @foo //~ ERROR value may contain borrowed pointers; use `'static` bound
40+
@F {f:t} as @foo //~ ERROR value may contain borrowed pointers; add `'static` bound
4141
}
4242

4343
fn to_foo_3<T:Copy + 'static>(t: T) -> @foo {

src/test/compile-fail/kindck-owned-trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
trait foo { fn foo(&self); }
1212

1313
fn to_foo<T:Copy + foo>(t: T) -> @foo {
14-
@t as @foo //~ ERROR value may contain borrowed pointers; use `'static` bound
14+
@t as @foo //~ ERROR value may contain borrowed pointers; add `'static` bound
1515
}
1616

1717
fn to_foo2<T:Copy + foo + 'static>(t: T) -> @foo {

0 commit comments

Comments
 (0)