Sign in
fuchsia
/
third_party
/
rust
/
c21fbfe7e310b9055ed6b7c46b7d37b831a516e3
/
.
/
src
/
test
/
ui
/
issues
/
issue-40402-ref-hints
/
issue-40402-1.rs
blob: 786c37e5969d8fcd09be810f2d3685440c2b5c7d [
file
] [
log
] [
blame
]
// Check that we do not suggest `ref f` here in the `main()` function.
struct
Foo
{
pub
v
:
Vec
<
String
>,
}
fn
main
()
{
let
mut
f
=
Foo
{
v
:
Vec
::
new
()
};
f
.
v
.
push
(
"hello"
.
to_string
());
let
e
=
f
.
v
[
0
];
//~ ERROR cannot move out of borrowed content
}