iter env-unify.1: rustdoc fixup (re-anchor check_in_workspace doc, drop transient task tag)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user