Closed
Description
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"] fn foo_malloc() { } }
mod bar { #[lang="exchange_malloc"] fn bar_malloc() { } }
This possibly couldn't work at all, because the other crates have had the original lang-item compiled into the appropriate places.
Metadata
Metadata
Assignees
Labels
No labels