2 //[mir]compile-flags: -Z borrowck=mir
4 // Check that we check fns appearing in constant declarations.
7 const MOVE: fn(&String) -> String = {
8 fn broken(x: &String) -> String {
9 return *x //[ast]~ ERROR cannot move out of borrowed content [E0507]
10 //[mir]~^ ERROR [E0507]