1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
fn with<F>(f: F) where F: FnOnce(&String) {} fn arg_item(&_x: &String) {} //~^ ERROR [E0507] fn arg_closure() { with(|&_x| ()) //~^ ERROR [E0507] } fn let_pat() { let &_x = &"hi".to_string(); //~^ ERROR [E0507] } pub fn main() {}