]> git.lizzy.rs Git - rust.git/blob - src/test/ui/drop/drop-with-type-ascription-1.rs
Rollup merge of #95376 - WaffleLapkin:drain_keep_rest, r=dtolnay
[rust.git] / src / test / ui / drop / drop-with-type-ascription-1.rs
1 // run-pass
2
3 fn main() {
4     let foo = "hello".to_string();
5     let foo: Vec<&str> = foo.split_whitespace().collect();
6     let invalid_string = &foo[0];
7     assert_eq!(*invalid_string, "hello");
8 }