iter clippy-sweep: clear all 61 cargo clippy warnings

Hygiene sweep across the workspace under `cargo clippy --workspace
--all-targets`. Before: 61 warnings. After: zero. Tests stay 563
green, `cargo doc` stays at zero warnings, and all three bench
scripts exit 0 against existing baselines.

Twelve lint classes, three fix shapes:

- Documentation hygiene (~32 hits): `doc_lazy_continuation` resolved
  by adding blank lines before continuation paragraphs or rephrasing
  the offending line; plus four `empty_line_after_doc_comments` hits
  in workspace.rs where eight `///` blocks left orphan by form-a.1
  T5 test relocation were converted to plain `//`.
- Idiomatic refactors (~16 hits): `.err().expect()` → `.expect_err()`,
  redundant `.into_iter()` and `.into()` removed, `|f| g(f)` →
  `g`, `.trim().split_whitespace()` → `.split_whitespace()`,
  `push_str("x")` → `push('x')`, two manual `impl Default` flipped
  to `#[derive(Default)]` + `#[default]`, two nested `if let Some(_)
  = …` collapsed.
- Block extraction (1 hit): a 13-line block inside an `else if`
  condition in synth's Var-arm extracted to a new helper
  `is_class_method_dispatch(name, env)` next to
  `qualifier_is_class_shape`.

Three `#[allow]`s with inline rationale where clippy's suggestion
would lose meaning: `only_used_in_recursion` on walk_pattern (the
parameter preserves the five-fn walker-framework signature
uniformity), 2× `if_same_then_else` on qualify_local_types shapes
(two branches encode semantically distinct disqualification
reasons), `too_many_arguments` on `Emitter::new` (8 workspace-flat
tables; bundling would just rename boilerplate).
This commit is contained in:
2026-05-14 00:48:17 +02:00
parent 04258c5cc1
commit abcdd05991
19 changed files with 302 additions and 162 deletions
+7 -5
View File
@@ -913,11 +913,12 @@ fn compare_primitives_smoke_prints_1_2_3_thrice() {
}
/// Iter 23.2: end-to-end coverage for the auto-loaded `Eq` class
/// + three primitive instances. The fixture calls `eq` on Int /
/// Bool / Str with both an equal and an unequal pair each; the
/// monomorphiser synthesises `eq__Int` / `eq__Bool` / `eq__Str`
/// in the prelude module; the binary prints six lines, one per
/// call. Equal-call lines are `1`, unequal-call lines are `0`.
/// and its three primitive instances. The fixture calls `eq` on
/// Int / Bool / Str with both an equal and an unequal pair each;
/// the monomorphiser synthesises `eq__Int` / `eq__Bool` /
/// `eq__Str` in the prelude module; the binary prints six lines,
/// one per call. Equal-call lines are `1`, unequal-call lines are
/// `0`.
#[test]
fn eq_primitives_smoke_compiles_and_runs() {
let stdout = build_and_run("eq_primitives_smoke.ail");
@@ -1610,6 +1611,7 @@ fn alloc_rc_recursive_list_sum() {
/// `@drop_rc_list_drop_borrow_IntList(ptr %t)` — recursively
/// cascades through the 4-cell tail, freeing each cell.
/// 5. Branches to the join.
///
/// And at `xs`'s let-close, the inlined partial drop skips slot 1
/// (already freed by the arm) and dec's the outer Cons cell.
///
+1 -1
View File
@@ -10,7 +10,7 @@
//! calls `gt`/`not` is monomorphised correctly at Int / Bool / Str.
//! 2. User-ADT integration with the unified mono pass
//! (`eq_ord_user_adt_runs_end_to_end`). Property: `instance Eq T`
//! + `instance Ord T` for a user-defined `T` produces working
//! plus `instance Ord T` for a user-defined `T` produces working
//! mono symbols when invoked through the prelude.
//! 3. Mono-symbol body-hash stability for `eq__IntBox`
//! (`eq_ord_user_adt_eq_intbox_hash_stable`). Property: the user
+2 -2
View File
@@ -704,8 +704,8 @@ fn rewrite_replaces_class_method_var_with_mono_symbol_same_module() {
}
/// Helper: build & run a workspace via `ail run` and capture stdout
/// + stderr. The 22b.3 e2e tests below all funnel through this so the
/// failure-mode reporting is uniform.
/// and stderr. The 22b.3 e2e tests below all funnel through this so
/// the failure-mode reporting is uniform.
fn ail_run(fixture_name: &str) -> (std::process::Output, String) {
let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let ail_bin = std::env::var("CARGO_BIN_EXE_ail")