Skip to main content

generate_stubs

Function generate_stubs 

Source
pub fn generate_stubs(
    program: &Program,
    map: &SourceMap,
    options: &Options,
) -> TokenStream
Expand description

Generates signature-only items for a program that did not type check.

The bodies are ::core::unreachable!(): the expansion also carries compile_error!s, so nothing here can ever run. Their purpose is to keep a Rust call site that mentions one of these functions from producing a second, unrelated “cannot find function” error on top of the real one.