Sign in
fuchsia
/
third_party
/
rust
/
3c2fd1a72d2e8cc80b354b4d2dd7931a7afe1b02
/
.
/
src
/
test
/
ui
/
not-copy-closure.rs
blob: f6530f9a410aa09687963471ef1a45a2efa1e810 [
file
] [
log
] [
blame
]
// Check that closures do not implement `Copy` if their environment is not `Copy`.
fn
main
()
{
let
mut
a
=
5
;
let
hello
=
||
{
a
+=
1
;
};
let
b
=
hello
;
let
c
=
hello
;
//~ ERROR use of moved value: `hello` [E0382]
}