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
&dyn Trait over a str aborts codegen: function-value adapter has no FnAbi descriptor #1818
with run (fix-lang stage1, and the #1810 branch's):
BUG: function-value adapter has no FnAbi descriptor [src/Codegen.w:1876 Codegen.gen_fn_to_fat_ptr_thunk]
The same with &dyn Display over a str (impl Display for str in std.traits).
Expected
abc! — a str place coerced to &dyn Speak (§11 trait objects) builds the fat {data, vtable} with the str header as data and dispatches say. A codegen phase bug on a well-typed program is the compiler's (No Silent Fallbacks: it is at least loud).
Found while building the #1810 (&str view value) matrix: the &dyn column has no baseline to compare against.
Activity
Box[dyn Trait] drops what it holds, exactly once, then frees its cell…
FnAbi/TypeLayout/Codegen/CCodegen: a shared `&str` is its own `{ptr, …
Globals: a call, dyn dispatch, stored callable or drop that writes a …
&str is its own {ptr,len} view (ABI v8): returned string slices, stag…