Skip to main content

Module output

Module output 

Source
Expand description

Related to out filenames of compilation (e.g. binaries).

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use std::collections::btree_map::Iter as BTreeMapIter; πŸ”’
use std::collections::btree_map::Keys as BTreeMapKeysIter; πŸ”’
use std::collections::btree_map::Values as BTreeMapValuesIter; πŸ”’
use std::path::Path; πŸ”’
use rustc_data_structures::stable_hash::StableOrd; πŸ”’
use rustc_errors::ColorConfig; πŸ”’
use rustc_errors::emitter::HumanReadableErrorType; πŸ”’
use rustc_macros::Decodable; πŸ”’
use rustc_macros::Encodable; πŸ”’
use rustc_macros::StableHash; πŸ”’
use rustc_span::Span; πŸ”’
use rustc_span::Symbol; πŸ”’
use rustc_structures::CrateType; πŸ”’
use crate::Session; πŸ”’
use crate::config::OutFileName; πŸ”’
use crate::config::OutputFilenames; πŸ”’
use crate::diagnostics::CrateNameEmpty; πŸ”’
use crate::diagnostics::FileIsNotWriteable; πŸ”’
use crate::diagnostics::InvalidCharacterInCrateName; πŸ”’
use crate::diagnostics::InvalidCharacterInCrateNameSuggestion; πŸ”’

MacrosΒ§

define_output_types πŸ”’

StructsΒ§

OutputTypes
Use tree-based collections to cheaply get a deterministic Hash implementation. Do not switch BTreeMap out for an unsorted container type! That would break dependency tracking for command-line arguments. Also only hash keys, since tracking should only depend on the output types, not the paths they’re written to.

EnumsΒ§

ErrorOutputType
The type of diagnostics output to generate.
OutputType
ResolveDocLinks

FunctionsΒ§

check_file_is_writeable
Make sure files are writeable. Mac, FreeBSD, and Windows system linkers check this already – however, the Linux linker will happily overwrite a read-only file. We should be consistent.
filename_for_input
filename_for_metadata
invalid_output_for_target
Checks if target supports crate_type as output
is_writeable πŸ”’
out_filename
validate_crate_name
Validate the given crate name.