]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-fn-in-const-a.rs
Merge commit 'b71f3405606d49b9735606b479c3415a0ca9810f' into clippyup
[rust.git] / src / test / ui / borrowck / borrowck-fn-in-const-a.rs
1 // Check that we check fns appearing in constant declarations.
2 // Issue #22382.
3
4 const MOVE: fn(&String) -> String = {
5     fn broken(x: &String) -> String {
6         return *x //~ ERROR cannot move
7     }
8     broken
9 };
10
11 fn main() {
12 }