refactor: clear clippy code lints across the workspace

Machine-applicable clippy fixes plus three by-hand cleanups; all
semantics-preserving (full workspace test suite green).

Auto-applied (cargo clippy --fix):
- dropped `.clone()` on the Copy type ParamMode (ret_mode/param_mode)
- map_or(false, p) -> is_some_and(p)
- removed redundant closures and an explicit .into_iter()
- useless format!, a needless deref, an as_bytes-after-slice

By hand:
- ailang-codegen: named the loop-frame tuple types (LoopFrame /
  LoopBinderSlot) instead of the bare nested
  Vec<(String, Vec<(String, String, String, Type)>)>, clearing the
  type-complexity lint and documenting what each slot holds.
- ailang-check: collapsed the two identical pass-through arms of the
  Type-Con qualifier (already-dotted / primitive) into one `||` guard.
- ailang-core: converted a stale `///` block (it described a test that
  was relocated, documenting nothing) back to a plain `//` comment.

Remaining clippy output is 16 markdown list-indentation nits in prose
doc comments — doc formatting, not code, left for a docs pass.
This commit is contained in:
2026-06-02 02:14:15 +02:00
parent d5e69148c6
commit e5534d1532
10 changed files with 35 additions and 28 deletions
+1 -1
View File
@@ -826,7 +826,7 @@ impl Desugarer {
free_vars_in_term(&desugared_body, &local_bound, &mut frees);
let captures: Vec<String> = frees
.iter()
.filter(|f| scope.contains_key(*f))
.filter(|f| scope.contains_key(f))
.cloned()
.collect();
+5 -6
View File
@@ -2387,12 +2387,11 @@ mod tests {
.expect("qualified Constraint.class in ClassDef-method Forall is the canonical form post-canonical-class-form");
}
/// on-disk fixture for `BareCrossModuleTypeRef`. Bare
/// `Ordering` Term::Ctor with no imports; the validator catches it
/// after prelude injection (so the candidate list contains
/// `prelude.Ordering`).
// `ct1_fixture_bare_xmod_rejected` relocated to
// `crates/ailang-core/tests/workspace_pin.rs` in iter pd.2.
// on-disk fixture for `BareCrossModuleTypeRef`. Bare `Ordering`
// Term::Ctor with no imports; the validator catches it after
// prelude injection (so the candidate list contains
// `prelude.Ordering`). `ct1_fixture_bare_xmod_rejected` relocated
// to `crates/ailang-core/tests/workspace_pin.rs` in iter pd.2.
/// on-disk fixture for `BadCrossModuleTypeRef`. Qualified
/// `Mystery.Type` with `Mystery` not a known module.