Skip to content

Check trait associated type defaults - #1992

Merged
sbillig merged 2 commits into
argotorg:masterfrom
sbillig:fix/assoc-type-default-checks
Nov 12, 2026
Merged

sbillig merged 2 commits into
argotorg:masterfrom
sbillig:fix/assoc-type-default-checks

Conversation

@sbillig

@sbillig sbillig commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

A trait's associated type default was lowered but never checked: type B = Option<Missing> reported nothing, and a body that used a default with a mode argument only failed in the MIR pass (16-0010). An impl that takes the default didn't check it either, since an impl checks only the values it writes.

A default is now checked where it is written, as an impl's value is: its lowering errors, its kind against the declaration, and its well-formedness. The impl's checks move into assoc_ty_value_diags, which both use.

A trait's associated type default was lowered but never checked, so
`type B = Option<Missing>` reported nothing, and a body that used a
default with a mode argument only failed in the MIR pass (16-0010).
Check a default where it is written, as an impl's value is: its
lowering errors, its kind and its well-formedness. The impl's checks
move into `assoc_ty_value_diags`, which both use.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T17:54:55.331870Z 04e93d2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sbillig
sbillig merged commit 6ccb3ca into argotorg:master Nov 12, 2026
9 checks passed
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