Crate rustc_driver_impl

Source
Expand description

The Rust compiler.

Β§Note

This API is completely unstable and subject to change.

Modules§

args
pretty
The various pretty-printing routines.
print πŸ”’
session_diagnostics πŸ”’
signal_handler πŸ”’
Signal handler for rustc Primarily used to extract a backtrace from stack overflow

Macros§

do_not_use_print πŸ”’
do_not_use_safe_print πŸ”’
version
Prints version information

Structs§

TimePassesCallbacks

Enums§

Compilation
Whether to stop or continue compilation.

Constants§

DEFAULT_BUG_REPORT_URL
EXIT_FAILURE
Exit status code used for compilation failures and invalid flags.
EXIT_SUCCESS
Exit status code used for successful compilation and help output.

Statics§

DEFAULT_LOCALE_RESOURCE
Raw content of Fluent resource for this crate, generated by fluent_messages macro, imported by rustc_driver to include all crates’ resources in one bundle.
DEFAULT_LOCALE_RESOURCES
ICE_PATH πŸ”’
USING_INTERNAL_FEATURES

Traits§

Callbacks

Functions§

catch_fatal_errors
Runs a closure and catches unwinds triggered by fatal errors.
catch_with_exit_code
Variant of catch_fatal_errors for the interface::Result return type that also computes the exit code.
describe_codegen_flags πŸ”’
describe_debug_flags πŸ”’
describe_flag_categories
Show help for flag categories shared between rustdoc and rustc.
describe_lints
Write to stdout lint command options, together with a list of all available lints
diagnostics_registry
dump_feature_usage_metrics πŸ”’
get_backend_from_raw_matches πŸ”’
Get the codegen backend based on the raw Matches.
handle_explain πŸ”’
handle_options
Process command line options. Emits messages as appropriate. If compilation should continue, returns a getopts::Matches object parsed from args, otherwise returns None.
ice_path πŸ”’
ice_path_with_config πŸ”’
init_logger
This allows tools to enable rust logging without having to magically match rustc’s tracing crate version. In contrast to init_rustc_env_logger it allows you to choose the values directly rather than having to set an environment variable.
init_rustc_env_logger
This allows tools to enable rust logging without having to magically match rustc’s tracing crate version.
install_ctrlc_handler
Install our usual ctrlc handler, which sets rustc_const_eval::CTRL_C_RECEIVED. Making this handler optional lets tools can install a different handler, if they wish.
install_ice_hook
Installs a panic hook that will print the ICE message on unexpected panics.
list_metadata πŸ”’
main
make_input πŸ”’
Extract input (string or file and optional path) from matches. This handles reading from stdin if - is provided.
make_output πŸ”’
parse_crate_attrs πŸ”’
print_crate_info πŸ”’
print_flag_list πŸ”’
print_wall_help πŸ”’
process_rlink πŸ”’
report_ice πŸ”’
Prints the ICE message, including query stack, but without backtrace.
run_compiler
This is the primary entry point for rustc.
show_md_content_with_pager πŸ”’
If color is always or auto, try to print pretty (formatted & colorized) markdown. If that fails or color is never, print the raw markdown.
usage πŸ”’