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
stdlib: print(usize) fails its Display bound although interpolation supports it #1673
Found while testing D64's usize copy-back result. This reproduces on the installed, verified main compiler (334739d, SHA-256 88b438898e344e8e1caa73bd4359e48ed21189a99e6de4f774e8157ed44011ef), independently of the modeled-C changes:
fn main: print(1 as usize)
with check exits 1:
type 'usize' does not implement trait 'Display' required by bound 'T: Display'
unknown method 'to_str' for type '&usize'
print at lib/std/builtins.w:36 requires Display and calls v.to_str() at line 40. The primitive Display registrations in lib/std/traits.w:262-273 list the fixed-width numeric types but omit usize/isize. The surrounding comment promises parity with string interpolation; existing D64 fixtures successfully interpolate usize results. Please cover both pointer-sized integer types and direct/interpolated formatting parity across targets.
Filed separately per the handoff's instruction to keep unrelated defects from displacing the modeled-C batch. The bounds regression uses interpolation, matching the existing byte-buffer bounds fixture; its actual contract failure remains asserted.
Activity
Paper cuts: Vec ranges as []T views, let-else return inference, usize…
ehartford commentedon Sep 26, 2026
Fixed on main by #1702 (55739d4); battery green, pinned by the behavior tests named in the PR.