rustc: change 'use' to 'add' in error message, fix #2994
This commit is contained in:
parent
a39429887a
commit
2bed5dc528
3 changed files with 3 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue