rust/compiler/rustc_middle/src
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
..
dep_graph Remove impl_for_typed_def_id macro. 2025-02-04 08:34:11 +11:00
hir Rollup merge of #137334 - compiler-errors:edition-2024-fresh-2, r=saethlin,traviscross 2025-02-23 02:44:18 -05:00
hooks Pretty print pattern type values with transmute if they don't satisfy their pattern 2025-02-05 14:56:41 +00:00
infer Clean up trivial traversal/lift impl generator macro calls. 2025-02-06 13:31:43 +11:00
middle Fix binding mode problems 2025-02-22 00:13:19 +00:00
mir Fix some use items that import more than necessary. 2025-02-24 09:30:42 +11:00
query Auto merge of #136539 - matthewjasper:late-normalize-errors, r=compiler-errors 2025-02-19 07:49:08 +00:00
thir Rollup merge of #137180 - compiler-errors:sym-regions, r=oli-obk 2025-02-23 00:16:19 +01:00
traits Change span field accesses to method calls 2025-02-24 14:22:31 +01:00
ty Introduce AssocOp::Binary. 2025-02-27 09:53:17 +11:00
util Simplify intra-crate qualifiers. 2025-02-11 14:59:13 +11:00
arena.rs intern valtrees 2025-02-13 00:38:17 +01:00
error.rs clean up layout error diagnostics 2025-02-18 13:22:45 +01:00
lib.rs Rollup merge of #137109 - bend-n:knife, r=oli-obk 2025-02-24 18:46:35 -05:00
lint.rs Move methods from Map to TyCtxt, part 3. 2025-02-21 14:31:09 +11:00
macros.rs Make fewer crates depend on rustc_ast_ir 2025-02-19 07:06:54 +00:00
metadata.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs Rollup merge of #137180 - compiler-errors:sym-regions, r=oli-obk 2025-02-23 00:16:19 +01:00
values.rs Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00