Expand description
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Β§
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_messagesmacro, imported byrustc_driverto include all cratesβ resources in one bundle.
- DEFAULT_LOCALE_ RESOURCES 
- ICE_PATH π
- USING_INTERNAL_ FEATURES 
TraitsΒ§
FunctionsΒ§
- catch_fatal_ errors 
- Runs a closure and catches unwinds triggered by fatal errors.
- catch_with_ exit_ code 
- Variant of catch_fatal_errorsfor theinterface::Resultreturn type that also computes the exit code.
- default_translator 
- 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_loggerit allows you to choose the logger config directly rather than having to set an environment variable.
- init_logger_ with_ additional_ layer 
- 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 logger config directly rather than having to set an environment variable. Moreover, in contrast toinit_logger, it allows you to add a custom tracing layer viabuild_subscriber, for example|| Registry::default().with(custom_layer).
- 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 ctrlchandler, 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 π
- Extract output directory and file from matches.
- 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 colorisalwaysorauto, try to print pretty (formatted & colorized) markdown. If that fails orcolorisnever, print the raw markdown.
- usage π
- warn_on_ πconfusing_ output_ filename_ flag 
- Warn if -ois used without a space between the flag name and the value and the value is a high-value confusables, e.g.-optimizeinstead of-o optimize, see issue #142812.