Skip to content

Intentional safety/lifetime rejection examples should be expect-error, not unverified #593

Closed

Description

@godofecht

Follow-up to #583.

Some documentation blocks are intentionally demonstrating compiler rejection, but they are currently ordinary flow fences. The docs checker therefore records a correct diagnostic as an unverified failure rather than a passing negative example.

The clearest cases are in docs/language/lifetime-domains.md. Around line 149, a callback-domain function calls malloc and the verifier correctly reports an RT-safety violation. Around line 202, a callback-domain function calls a session-domain function and the verifier correctly reports a lifetime-domain violation. Those diagnostics are the point of the examples.

The repository already supports flow expect-error, and other docs use it successfully for immutable assignment, type mismatch, unsafe imports, and span lifetime violations.

Audit the remaining unverified ledger for examples whose surrounding prose explicitly demonstrates a rejection or safety diagnostic. Mark only those cases expect-error; do not use it to hide ordinary broken examples. Where a negative example is intended to demonstrate a particular rule, the checker should reach a meaningful semantic/type stage rather than merely fail because its fragment harness is malformed.

Acceptance: intentional compiler-rejection examples are represented as successful expected-error entries with the intended diagnostic/stage, and they no longer inflate the ordinary unverified count in #583.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions