]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/span/borrowck-fn-in-const-b.rs
1 // Check that we check fns appearing in constant declarations.
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