From 92b94afa2a8c56330ad61fc868dcbe87807c9e44 Mon Sep 17 00:00:00 2001 From: Brummel Date: Sun, 10 May 2026 02:19:24 +0200 Subject: [PATCH] iter env-unify.1: rustdoc fixup (re-anchor check_in_workspace doc, drop transient task tag) --- crates/ailang-check/src/lib.rs | 26 +++++++++++++------------- crates/ailang-check/src/mono.rs | 9 ++++----- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/crates/ailang-check/src/lib.rs b/crates/ailang-check/src/lib.rs index 227aeb6..11c0379 100644 --- a/crates/ailang-check/src/lib.rs +++ b/crates/ailang-check/src/lib.rs @@ -1072,19 +1072,6 @@ pub fn build_module_globals( Ok(out) } -/// Checks the bodies of a single module in the context of the workspace. -/// Assumption: `module_globals` already contains the top-level symbol -/// tables for **all** modules of the workspace (including `m`) — built -/// by `build_module_globals`. -/// -/// Returns **all** errors found in this module, in def declaration order: -/// -/// - The type-def setup phase is fail-fast within the module (duplicate -/// type or ctor names corrupt the env, so we abort *this* module after -/// the first such error and let the outer loop continue with others). -/// - The body-check phase is multi-diagnose: each def is checked -/// independently against the assembled env; a failure is recorded and -/// the next def is attempted. /// Build the workspace-flat `Env` shared by `check_in_workspace` /// and `mono::build_workspace_env`. Populates every field whose /// contents are derivable from `Workspace` alone — no @@ -1171,6 +1158,19 @@ pub fn build_check_env(ws: &Workspace) -> Env { env } +/// Checks the bodies of a single module in the context of the workspace. +/// Assumption: `module_globals` already contains the top-level symbol +/// tables for **all** modules of the workspace (including `m`) — built +/// by `build_module_globals`. +/// +/// Returns **all** errors found in this module, in def declaration order: +/// +/// - The type-def setup phase is fail-fast within the module (duplicate +/// type or ctor names corrupt the env, so we abort *this* module after +/// the first such error and let the outer loop continue with others). +/// - The body-check phase is multi-diagnose: each def is checked +/// independently against the assembled env; a failure is recorded and +/// the next def is attempted. fn check_in_workspace( m: &Module, ws: &Workspace, diff --git a/crates/ailang-check/src/mono.rs b/crates/ailang-check/src/mono.rs index d303fe1..de3d4fe 100644 --- a/crates/ailang-check/src/mono.rs +++ b/crates/ailang-check/src/mono.rs @@ -355,12 +355,11 @@ pub(crate) fn mono_target_key(t: &MonoTarget) -> (String, String, String) { ) } -/// Iter 22b.3 / 2026-05-10 unify: thin wrapper over -/// [`crate::build_check_env`]. The mono pass needs the same -/// workspace-flat `Env` shape as `check_in_workspace`, so both +/// Thin wrapper over [`crate::build_check_env`]. The mono pass needs +/// the same workspace-flat `Env` shape as `check_in_workspace`, so both /// share one source of truth. Per-fn entry points -/// (`collect_mono_targets`, `collect_residuals_ordered`) clone the -/// env and apply per-fn overlay (current_module, globals from +/// (`collect_mono_targets`, `collect_residuals_ordered`) clone the env +/// and apply per-fn overlay (current_module, globals from /// module_globals, imports from module_imports, rigid_vars). pub fn build_workspace_env(ws: &Workspace) -> crate::Env { crate::build_check_env(ws)