You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HashSet intrinsic lowering assumes HashMap shapes and breaks contains/remove #81
HashSet intrinsic lowering is incomplete and currently reuses HashMap paths that assume map-style generic arity and argument counts. Direct HashSet operations already fail; borrowing only exposes the same underlying bug.
This was split out of #78 after investigation showed it is not the same bug as projected receiver lowering.
Spec references:
docs/with-specification.md §7.7 method call syntax for self: &T / self: &mut T
Minimal repros
Repro 1: direct contains fails
fn main:
let set: HashSet[i32] = HashSet.new()
set.insert(4)
assert(set.contains(4))
HashSet.new, insert, contains, remove, and len should work consistently for both direct and borrowed receivers.
Actual
Direct HashSet programs already fail at runtime, including contains and remove. The borrowed form in issue64_borrowed_map_set_methods.w is not a distinct receiver bug; it is another manifestation of the same intrinsic lowering problem.
Root cause
MIR classifies HashSet methods onto map intrinsics, but codegen remains HashMap-specific:
Activity
Fix #81 HashSet lowering and add timing summaries