rust/compiler/rustc_ast_pretty
Nicholas Nethercote ceafbad81f Introduce AssocOp::Binary.
It mirrors `ExprKind::Binary`, and contains a `BinOpKind`. This makes
`AssocOp` more like `ExprKind`. Note that the variants removed from
`AssocOp` are all named differently to `BinOpToken`, e.g. `Multiply`
instead of `Mul`, so that's an inconsistency removed.

The commit adds `precedence` and `fixity` methods to `BinOpKind`, and
calls them from the corresponding methods in `AssocOp`. This avoids the
need to create an `AssocOp` from a `BinOpKind` in a bunch of places, and
`AssocOp::from_ast_binop` is removed.

`AssocOp::to_ast_binop` is also no longer needed.

Overall things are shorter and nicer.
2025-02-27 09:53:17 +11:00
..
src Introduce AssocOp::Binary. 2025-02-27 09:53:17 +11:00
Cargo.toml Upgrade the compiler to edition 2024 2025-02-22 00:01:48 +00:00