enlightware / enlightware/ferlium

Support associated const formulas for blanket impls

Open
#130 0 comments 0 reactions 0 assignees View on GitHub
trait
Dominant language
Rust
Stars
14
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Blanket impls currently store concrete `Vec` associated const values, which is insufficient when a const depends on generic parameters, such as `Value::SIZE` or `Value::ALIGN` for `Value for [T] where T: Value`.

Currently the compiler has a work-around for `Value::SIZE` and `Value::ALIGN`. But obviously that doesn't scale.

We should add an associated-const template/formula representation for blanket impls, substitute concrete types during materialization, and evaluate the formulas into concrete dictionary values. This should replace the current `Value`-specific layout synthesis special case.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by tracing the blanket-impl representation, materialization, const evaluation, and the current Value-specific layout synthesis workaround. Done means generic associated-const formulas are substituted and evaluated for concrete blanket impls, replacing that special case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.