]> git.proxmox.com Git - rustc.git/blob - src/test/ui/span/borrowck-fn-in-const-b.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / span / borrowck-fn-in-const-b.rs
1 // Check that we check fns appearing in constant declarations.
2 // Issue #22382.
3
4 // How about mutating an immutable vector?
5 const MUTATE: fn(&Vec<String>) = {
6 fn broken(x: &Vec<String>) {
7 x.push(format!("this is broken"));
8 //~^ ERROR cannot borrow
9 }
10 broken
11 };
12
13 fn main() {
14 }