Skip to main content

library_owned_functions

Function library_owned_functions 

Source
pub fn library_owned_functions(assembled: &str) -> HashSet<String>
Expand description

The functions of an assembled program that ARE the standard library’s definitions: those whose ## To section is byte-identical to the section the library itself ships under that name.

This is provenance by content, and it is what licenses every name-keyed lowering of a library function (the Rust tier’s memchr indexOf, its AVX2 trunc, …): such a lowering encodes what the LIBRARY’s body computes, so it may replace a call only when the callee is that body. A program’s own function of the same name — the program’s definition wins — never qualifies, and neither does anything a program merely spells like the library. Sound by construction: a program that copies a library section verbatim computes exactly what the lowering computes.