Skip to content

proposal: bridge the implementation gap - #2982

Merged
ehartford merged 1 commit into
mainfrom
bridge-the-impl-gap
Nov 2, 2026
Merged

ehartford merged 1 commit into
mainfrom
bridge-the-impl-gap

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Docs-only. Eric 2026-11-02: the #1 goal is the lag between spec and implementation. docs/proposals/bridge-the-impl-gap.md lists everything to accomplish (the inventory from today's audit, the mechanism, the order, done-when).

The work list between the spec and the compiler as of today (rulings with
no implementation, regressions, the compiler's own admissions, the spec's
own errata, the fourteen NON-COMPLIANT changelog lines, the ceremony the
tree teaches), the three mechanisms that keep the list from growing back
(a conformance inventory the gate checks, a fixture per ruling with an
open-fixtures lane and compiled spec examples, a visible queue with
delegation that includes the implementation), the order, and done-when.
@ehartford
ehartford merged commit 8b3ddf8 into main Nov 2, 2026
@ehartford
ehartford deleted the bridge-the-impl-gap branch November 2, 2026 18:59
ehartford added a commit that referenced this pull request Nov 6, 2026
#2982 audit (#3054)

#3044: an async block's consumed captures are recorded (record_async_block_captures),
so the debug allocator sees one owner. #3046: `xs[i]` is user-indexable through
Index/IndexMut for a non-int index, and `get` is not a place. #3047 Gap 1: a trait
default method's parameter types resolve in the trait's own module (D140), so an
impl that leaves the types to the trait never imports them; Gap 2 stays open.
#3048: a blanket impl's methods dispatch by bound, and an unmet bound is refused.
#3049: a slice of a raw pointer requires unsafe.

Two defects the seed-built stage1 exposed while the D140 switch was wired, both
proven in lldb on out/bootstrap/bin/with-stage1:

- Sema.check_ident excluded a `const` from check_top_level_let_before_use, so a
  body typed inside the initializer pass (check_top_level_let_values →
  ensure_body_typed → check_callee_bodies_first through rt_core bodies →
  InternStringArena.store) read an untyped const's slot and got 0 with no
  diagnostic; MIR then refused the body ("use rvalue type is incompatible with
  assign destination", TY_NEVER). Fixture:
  behav_const_read_in_body_typed_during_global_pass.w.

- A `str` field saved by plain copy (`let saved: str = self.current_module_path`)
  is a view of the field under the pinned seed, not a copy (D111): the restore
  after the D140 module switch assigned the trait's module back to itself, and
  every later field read in that body was cross-package ("field ... is private to
  its package"), selfcheck red at 24 errors. package_of's argument read at entry
  under lldb showed <embedded-std>/std/traits.w at the refusal with no switch in
  between; a probe prints the switched value under `src/main run` and the saved
  one under the installed compiler. The three plain-copy saves
  (resolve_trait_default_method_type, the check_bodies preparation,
  check_top_level_let_before_use) now clone, marked seed-bound.

Co-authored-by: Eric Hartford <[email protected]>
@ehartford

Copy link
Copy Markdown
Contributor Author

Landed #3054 (12489f1): #3044, #3046, #3047 Gap 1, #3048, #3049, each with failing-first fixtures. Two seed-only Sema defects found and fixed on the way (an untyped const read inside the initializer pass; a str field saved by plain copy is a view under the pinned seed, so the D140 module restore was a no-op). #3047 Gap 2 remains open for Eric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant