From a9291149bd113111db6b9f5aeb4c4e8afc39042e Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Sun, 13 Sep 2026 21:08:41 +0200 Subject: [PATCH] test(ppc): identity_op off in the golden generator, with the reason The shifts clippy objects to are the point. These are instruction ENCODERS: every field is written at its ISA position, so `(((vb >> 5) & 0x3) << 0)` sits in a column with << 11, << 16, << 21 and reads straight against the manual's field table, and a trailing `| 0` says 'the low field is zero here', which is information. Reduced to what clippy wants, the encodings stop being checkable by eye against the ISA -- and eye-checkability is all a golden GENERATOR has. There is nothing else to verify it against. Co-Authored-By: Claude Opus 5 --- crates/sylpheed-ppc/tests/disasm_goldens.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/sylpheed-ppc/tests/disasm_goldens.rs b/crates/sylpheed-ppc/tests/disasm_goldens.rs index e010c382..1de29a8d 100644 --- a/crates/sylpheed-ppc/tests/disasm_goldens.rs +++ b/crates/sylpheed-ppc/tests/disasm_goldens.rs @@ -1,3 +1,13 @@ +// 🔴 `identity_op` IS OFF FOR THIS FILE, and the shifts it objects to are the +// point. These are instruction ENCODERS: every field is written at its ISA +// position, so `(((vb >> 5) & 0x3) << 0)` sits in a column with `<< 11`, +// `<< 16`, `<< 21` and reads straight against the manual's field table. The +// trailing `| 0` on a fixed-form word says "the low field is zero here", +// which is information. Reduced to what clippy wants, the encodings stop +// being checkable by eye against the ISA, and eye-checkability is the only +// thing a golden generator has -- there is nothing else to verify it against. +#![allow(clippy::identity_op)] + //! Assert-based goldens for the PPC disassembler. //! //! Each test owns an inline list of `(raw, addr, label)` cases. On a