Closed as not planned
Description
rustfmt output:
fn get_in_params() {
m.in_params
.iter()
.map(|| {
let direction = arg_types.get_arg(name); // removing this line causes formatting ?!?!?!
match ty {
Some(_) => {
if some_bool {
}
match size {
_ => {
if some_bool { // removing any of these lines causes formatting
} else { // the following line must be long or else formatting will happen
panic!("missing 'arg_type' attribute: string direction must be specified")
}
}
}
}
None => {
if some_bool {
let resolved_type = format!("ptr[{}, array[{}]]", to_c_name(&direction), ty_to_syzkaller_str(ast, ty).unwrap());
}
}
}
})
.collect() // removing this line causes formatting ?!?!?!
}
Removing or significantly editing basically any line causes the let resolved_type = ...
line (which is too long and should be wrapped) to be reformatted.