Sign in
◑
Theme
rust
/
rust
/
2a61ba8577ed3c3e1cfeb433d06cf5464ff2fdf3
/
.
/
tests
/
ui
/
borrowck
/
const-cannot-move-shared-ref.rs
blob: 96a38a0e9f00e14c81810e68fc3c3799c606c160 [
file
]
// Checks whether borrow checking visits constants correctly
struct
NonCopy
(
u8
);
const
C
:
()
=
{
let
&
moved
=
&
NonCopy
(
0
);
//~^ ERROR cannot move out of a shared reference
};
fn
main
()
{
}