Sign in
fuchsia
/
third_party
/
rust
/
cfcc5c296ed6fabcc8b9d380eaaea8a7352299fd
/
.
/
src
/
test
/
ui
/
borrowck
/
borrowck-drop-from-guard.rs
blob: 67a2275dcf74f98822c3e4941f81f087cd6041df [
file
] [
log
] [
blame
]
//compile-flags: -Z borrowck=mir
fn
foo
(
_
:
String
)
{}
fn
main
()
{
let
my_str
=
"hello"
.
to_owned
();
match
Some
(
42
)
{
Some
(
_
)
if
{
drop
(
my_str
);
false
}
=>
{}
Some
(
_
)
=>
{}
None
=>
{
foo
(
my_str
);
}
//~ ERROR [E0382]
}
}