Skip to content

fix: complete generic function call defaults - #1535

Open
sbillig wants to merge 12 commits into
argotorg:masterfrom
sbillig:fix/generic-function-default-arguments
Open

sbillig wants to merge 12 commits into
argotorg:masterfrom
sbillig:fix/generic-function-default-arguments

Conversation

@sbillig

@sbillig sbillig commented Aug 1, 2026 •

Copy link
Copy Markdown
Collaborator

Completes omitted generic function arguments from trailing type and const defaults.

Also:

  • preserves Self defaults on associated functions
  • validates generic const defaults at declaration
  • gives = _ defaults distinct call-site layout identities
  • fixes dependent wildcard root tracking
  • expands coverage for inference, arity, traits, bounds, and layout parameters

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7c5774d68

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/hir/src/analysis/ty/ty_lower.rs Outdated
@sbillig

sbillig commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 015e2edde5

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sbillig
sbillig force-pushed the fix/generic-function-default-arguments branch from 1ec4a80 to 968caff Compare September 18, 2026 06:08
@sbillig

sbillig commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Capture bound arguments once, instantiate associated const defaults, and share const-body owner assumptions. Reject forward references to type parameters and cover reordered captures, associated defaults, generic owners, and recursive calls.
Enforce the lowering precondition independently of type-check diagnostics for every const-evaluable owner. Cover malformed generic-default syntax in direct CTFE and CLI crash regressions.
Classify function-item paths explicitly and lower their zero-sized values. Reconstruct trait witnesses from function types for calls through stored values, with layout, codegen, and executable default-argument coverage.
Unify argument completion and validation across callables, ADTs, traits, and aliases while preserving captures and application-owned layout roots.

Bind projection-constrained method receivers before normalization. Reserve provider and structural layout slots before checked lowering, keeping array and sibling identities stable across deferred and zero extents.

Cover declaration errors, caller environments, inference identities, query-order stability, nested layouts, CLI diagnostics, and executable calls.
@sbillig
sbillig force-pushed the fix/generic-function-default-arguments branch from 968caff to 31a78ff Compare September 21, 2026 19:44

This branch has not been deployed

No deployments
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