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
Building on the new optional lang items, this would, for example, allow someone to substitute a new version of malloc (e.g. because they want to count the number of allocations, or have a specialised, high-performance implementation).
Only allowing it cross crate would mean there wouldn't be any confusion about which takes precedence in:
mod foo {#[lang="exchange_malloc"]fnfoo_malloc(){}}mod bar {#[lang="exchange_malloc"]fnbar_malloc(){}}
This possibly couldn't work at all, because the other crates have had the original lang-item compiled into the appropriate places.