Skip to main content

resolve_scalar_return_wrappers

Function resolve_scalar_return_wrappers 

Source
fn resolve_scalar_return_wrappers(
    content: &str,
    class_index: &HashMap<&str, &ClassNameEntry>,
) -> String
Expand description

Resolve scalar .__MX_WRAP_RETURN_<RustName>__(<expr>) placeholders emitted by class-method wrappers whose Rust return type may name a different ExternalPtr-backed class.

Unlike CLASS_REF, an unresolved return wrapper is a quiet no-op (the bare <expr>): the syntactic macro-time heuristic intentionally allows false positives, and write time is where we know whether <RustName> is registered in this package.