Skip to content

A function that reaches an assigner of a destroyer global assigns it (#3338); type methods on a type parameter are each instance's own type (#3332); a default body's join is each impl's (#3335, half) - #3341

Merged
ehartford merged 4 commits into
mainfrom
type-facts
Nov 15, 2026

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

#3338 (§31.8.6). with get records a function that assigns a function-pointer global through a call, a static helper included: F<TAB>assigns<TAB>G<TAB>F reaches A, whose body assigns G. The walk goes back from each assigner over an indexed caller table. Only function-pointer globals are recorded (what a destroyer clause can name). Test: conan_contract_proofs_assigns_test (direct, through a call, through a static, a typedef'd pointer global, a plain global, a call that reaches nothing).

#3332 (§17.2). T.name(), T.size(), T.align() and nameof[T]() in a generic function are each instance's own type. T.name() and T.size() aborted the compiler; nameof[T]() printed T (codegen read the name from the syntax). Sema records the type per body (note_type_method), MIR emits the constant, so both backends agree. Test: behav_3332_type_methods_on_a_type_parameter.

#3335, the join half. A default method's body is checked under its impl's own signature, so a join whose demand is Self no longer reports "conflicting contextual join decisions" when two types implement the trait. Test: behav_3335_default_body_join_is_each_impls. The other half (Self.make(x) lowered with a receiver) follows separately.

Spec. §31.8.6's status note becomes "Implemented" (status notes are kept true as code lands, Eric 2026-11-14).

Battery: GREEN on a9b84f1; the note is a docs-only commit on top. The run before it was red on the sdl UAT scenario (with get c.sdl timed out on the first, per-function walk); the last code commit replaces that walk and the scenario passes in 123 s.

Closes #3338. Closes #3332.

Eric Hartford added 4 commits November 14, 2026 17:39
…3338); T.name(), T.size(), T.align() and nameof[T]() are each instance's own type, emitted by MIR from Sema's record (#3332)
… a join whose demand is Self is each impl's decision (#3335, the join half)
…nd records only function-pointer globals: with get c.sdl timed out on the per-function walk
@ehartford
ehartford merged commit cc82e4d into main Nov 15, 2026
@ehartford
ehartford deleted the type-facts branch November 15, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant