blob: fbf9eecbb130878bc264487b90ee8763628867d6 (
plain)
1
2
3
4
5
6
7
8
|
//@ run-pass
fn main() {
let foo = "hello".to_string();
let foo: Vec<&str> = foo.split_whitespace().collect();
let invalid_string = &foo[0];
assert_eq!(*invalid_string, "hello");
}
|