* Add (failing) test for #1397 * Fix for #1397 Specifically, we end up double-adding a trailing comma for single-member struct patterns that are arranged vertically. One is added by write_list (since such structs return true for needs_trailing_separator), and another is added by the if in the old code.
23 lines
478 B
Rust
23 lines
478 B
Rust
pub enum TransactionState {
|
|
Committed(i64),
|
|
}
|
|
|
|
pub enum Packet {
|
|
Transaction { state: TransactionState },
|
|
}
|
|
|
|
fn baz(p: Packet) {
|
|
loop {
|
|
loop {
|
|
loop {
|
|
loop {
|
|
if let Packet::Transaction {
|
|
state: TransactionState::Committed(ts, ..), ..
|
|
} = p {
|
|
unreachable!()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|