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_messages
macro, imported byrustc_driver
to 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_errors
for theinterface::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 setsrustc_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
isalways
orauto
, try to print pretty (formatted & colorized) markdown. If that fails orcolor
isnever
, print the raw markdown. - usage π