← board

Rust frontend — generics with trait bounds

What it does

Extend the existing monomorphization engine (GenericFuncs/GenericMethods, defs.inc ~679-789 — already does Pascal-generic specialization) to accept where-clause / inline trait bounds (fn f<T: Display>(x: T)) and check that the bound is satisfied at specialization time (the concrete T must have an impl of the required trait reachable).

Not new conceptually — same specialize-per-call-site machinery already proven for Pascal generics — but real engineering volume: real-world dep code (shakmaty alone: 123 generic functions, 63 impl<T> blocks, 57 where clauses) leans on this heavily, more than the app code itself does.

Scope

Acceptance

Log