Skip to content

Audit and resolve #[allow(dead_code)] stubs in cssl-hir #2

@Apocky

Description

@Apocky

Summary

Two methods in cssl-hir/src/cap_check.rs are marked #[allow(dead_code)] with the comment "reserved for T3.4-phase-2.5 expression walk":

  • Line 137: fn emit(&mut self, message: impl Into<String>, span: Span)
  • Line 231: fn matrix(&self) -> &AliasMatrix

There is also a stub in cssl-hir/src/lower.rs:1271:

#[allow(dead_code)]
const fn _span_referenced(_: Span) {}

What to do

For each #[allow(dead_code)] item:

  1. Check if the T3.4-phase-2.5 work has landed (search DECISIONS.md for T3.4).
  2. If the work is complete and the function is genuinely unused: remove it, or wire it up if it was meant to be called.
  3. If the work is still pending: add a tracking comment with the DECISIONS.md entry it's waiting on.

Why this is a good first issue

  • No compiler theory required — it's code archaeology
  • Forces you to read DECISIONS.md, which gives a great overview of the project
  • Teaches the HIR capability-checker module (cssl-hir/src/cap_check.rs)
  • Clean outcome: either the dead code is gone, or its purpose is documented

Files

  • compiler-rs/crates/cssl-hir/src/cap_check.rs (lines 137, 231)
  • compiler-rs/crates/cssl-hir/src/lower.rs (line 1271)
  • DECISIONS.md (search for T3.4-phase-2.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions