8 lines
173 B
Rust
8 lines
173 B
Rust
|
// error-pattern:illegal borrow: borrowed value does not live long enough
|
||
|
|
||
|
fn main() {
|
||
|
let v = ~"test";
|
||
|
let sslice = str::slice(v, 0, v.len());
|
||
|
fail!(sslice);
|
||
|
}
|