Module rustc_interface::util[−][src]

Structs

ReplaceBodyWithLoop

Replaces function bodies with loop {} (an infinite loop). This gets rid of all semantic errors in the body while still satisfying the return type, except in certain cases, see below for more.

Constants

CRATE_TYPES
STACK_SIZE

Functions

add_configuration

Adds target_feature = "..." cfgs for a variety of platform specific features (SSE, NEON etc.).

build_output_filenames
categorize_crate_type
check_attr_crate_type
collect_crate_types
commit_date_str

Returns the “commit date” of HEAD of the Git repo from which rustc was built as a static string.

commit_hash_str

Returns the full SHA1 hash of HEAD of the Git repo from which rustc was built.

compute_crate_disambiguator
create_session
get_builtin_codegen_backend
get_codegen_backend
get_codegen_sysroot
get_rustc_path_inner
get_stack_size
load_backend_from_dylib
non_durable_rename

This function attempts to bypass the auto_da_alloc heuristic implemented by some filesystems such as btrfs and ext4. When renaming over a file that already exists then they will “helpfully” write back the source file before committing the rename in case a developer forgot some of the fsyncs in the open/write/fsync(file)/rename/fsync(dir) dance for atomic file updates.

release_str

Returns a version string such as “0.12.0-dev”.

rustc_path
scoped_thread

Like a thread::Builder::spawn followed by a join(), but avoids the need for 'static bounds.

setup_callbacks_and_run_in_thread_pool_with_globals
sysroot_candidates
version_str

Returns a version string such as “rustc 1.46.0 (04488afe3 2020-08-24)”