Sign in
rust
/
rust
/
a0f398e89df9767c93c81cd58d44fdba071258a8
/
.
/
tests
/
ui
/
drop
/
drop-with-type-ascription-1.rs
blob: fbf9eecbb130878bc264487b90ee8763628867d6 [
file
] [
log
] [
blame
]
//@ 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"
);
}