Skip to content

ICE: let d = Ok(1) then {d:?} — ':?' reached MIR for type 0 with no registered formatter #2395

Closed

Description

@ehartford

On main (880b0f0, installed with v0.15.3.0):

fn main:
    let d = Ok(1)
    print(f"{d:?}")

with check prints BUG: ':?' reached MIR for type 0 with no registered formatter (D61) [src/MirLower.w:3403] and with run aborts. The binding's type never completes (E is fixed by nothing), Sema lets it reach MIR as type 0 instead of settling it or reporting an inference error at the binding. This is the unfinished #1856 §4.2.1 soft-literal work: the spec (004_types.md §4.2.1, D128 locals typed by their uses) wants the use that settles such a binding to decide the soft literal's type, with uses before settlement retyped. A Sep-era implementation exists uncommitted in the next-sema-values worktree (pending_soft_committed + settle-time literal recheck) but predates the pending-machinery redesign; it is being re-expressed on the current design with its fixtures (behav_1856_soft_literal_settles, err_1856_soft_literal_out_of_range, err_1856_suffixed_literal_is_hard).

Activity

  1. added a commit that references this issue on Oct 13, 2026
    1b44864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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