Open
Description
The fn body here indents as shown:
pub fn build_lane_table_states<'grammar>
(grammar: &'grammar Grammar,
start: NonterminalString)
-> Result<Vec<LR1State<'grammar>>, LR1TableConstructionError<'grammar>> {
let (lr0_states, lr0_conflicts) = match build::build_lr0_states(grammar, start) {
Ok(s) => (s, vec![]),
Err(e) => (e.states, e.conflicts),
};
unimplemented!()
}
But I would expect:
pub fn build_lane_table_states<'grammar>
(grammar: &'grammar Grammar,
start: NonterminalString)
-> Result<Vec<LR1State<'grammar>>, LR1TableConstructionError<'grammar>> {
let (lr0_states, lr0_conflicts) = match build::build_lr0_states(grammar, start) {
Ok(s) => (s, vec![]),
Err(e) => (e.states, e.conflicts),
};
unimplemented!()
}
The trigger is definitely having the open paren on the next line. Admittedly, I wouldn't ordinarily write a fn this way, but it is produced by rustfmt in some cases.