Change borrowck error 'the the block' -> 'the block'
This commit is contained in:
@@ -50,7 +50,7 @@ fn explain_region(cx: ctxt, region: ty::region) -> ~str {
|
|||||||
some(ast_map::node_block(blk)) => {
|
some(ast_map::node_block(blk)) => {
|
||||||
fmt!{"the lifetime %s as defined on %s",
|
fmt!{"the lifetime %s as defined on %s",
|
||||||
bound_region_to_str(cx, br),
|
bound_region_to_str(cx, br),
|
||||||
explain_span(cx, ~"the block", blk.span)}
|
explain_span(cx, ~"block", blk.span)}
|
||||||
}
|
}
|
||||||
some(_) | none => {
|
some(_) | none => {
|
||||||
// this really should not happen
|
// this really should not happen
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
fn get() -> &int {
|
fn get() -> &int {
|
||||||
let x = 3;
|
let x = 3;
|
||||||
return &x;
|
return &x;
|
||||||
//~^ ERROR illegal borrow: borrowed pointer must be valid for the lifetime & as defined on the the block at 8:17, but the borrowed value is only valid for the block at 8:17
|
//~^ ERROR illegal borrow: borrowed pointer must be valid for the lifetime & as defined on the block at 8:17, but the borrowed value is only valid for the block at 8:17
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user