mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
13 lines
232 B
Rust
13 lines
232 B
Rust
// Check that we check fns appearing in constant declarations.
|
|
// Issue #22382.
|
|
|
|
const MOVE: fn(&String) -> String = {
|
|
fn broken(x: &String) -> String {
|
|
return *x //~ ERROR cannot move
|
|
}
|
|
broken
|
|
};
|
|
|
|
fn main() {
|
|
}
|