-
Notifications
You must be signed in to change notification settings - Fork 0
Hash trait and non-string Map keys #53
Copy link
Copy link
Open
Labels
codegenJIT, AOT, FIR lowering, runtimeJIT, AOT, FIR lowering, runtimegapSpecced or planned but not yet implementedSpecced or planned but not yet implementedmediumShould get done, not urgentShould get done, not urgentrfcTied to a specific RFC or design docTied to a specific RFC or design docstdlibStandard library modules and builtinsStandard library modules and builtinstype-systemType checker, inference, generics, traitsType checker, inference, generics, traits
Description
Metadata
Metadata
Assignees
Labels
codegenJIT, AOT, FIR lowering, runtimeJIT, AOT, FIR lowering, runtimegapSpecced or planned but not yet implementedSpecced or planned but not yet implementedmediumShould get done, not urgentShould get done, not urgentrfcTied to a specific RFC or design docTied to a specific RFC or design docstdlibStandard library modules and builtinsStandard library modules and builtinstype-systemType checker, inference, generics, traitsType checker, inference, generics, traits
Re-filing the unfinished half of #16, which was closed when Set shipped — the Hash side never happened.
Current state (verified Aug 2026)
codegen/src/runtime/map.rs— keys are heap string pointers compared by content).Eqrather than the designed invisible-Hash-from-Eq model (protocols RFC: "Hash is not a protocol — it's an invisible consequence of Eq").Map[K,V] requires K includes Eqconstraint is enforced on map literals — only key-type homogeneity (typecheck/src/check_expr.rs:185-215).Scope
Tracked on the docs Roadmap page (Language section). Related history: #16.