Struct rustc_trans::session::Session [] [src]

pub struct Session {
    pub dep_graph: DepGraph,
    pub target: Config,
    pub host: Target,
    pub opts: Options,
    pub cstore: Rc<CrateStore<'a> + 'static>,
    pub parse_sess: ParseSess,
    pub entry_fn: RefCell<Option<(u32, Span)>>,
    pub entry_type: Cell<Option<EntryFnType>>,
    pub plugin_registrar_fn: Cell<Option<u32>>,
    pub default_sysroot: Option<PathBuf>,
    pub local_crate_source_file: Option<PathBuf>,
    pub working_dir: PathBuf,
    pub lint_store: RefCell<LintStore>,
    pub lints: RefCell<HashMap<u32Vec<(LintId, Span, String)>, BuildHasherDefault<FnvHasher>>>,
    pub plugin_llvm_passes: RefCell<Vec<String>>,
    pub mir_passes: RefCell<Passes>,
    pub plugin_attributes: RefCell<Vec<(String, AttributeType)>>,
    pub crate_types: RefCell<Vec<CrateType>>,
    pub dependency_formats: RefCell<HashMap<CrateTypeVec<Linkage>, BuildHasherDefault<FnvHasher>>>,
    pub crate_disambiguator: Cell<Name>,
    pub features: RefCell<Features>,
    pub recursion_limit: Cell<usize>,
    pub injected_allocator: Cell<Option<u32>>,
    pub injected_panic_runtime: Cell<Option<u32>>,
    pub available_macros: RefCell<HashSet<NameRandomState>>,
    pub imported_macro_spans: RefCell<HashMap<Span(String, Span)RandomState>>,
    // some fields omitted
}
Unstable (rustc_private)

Fields

dep_graph: DepGraph
Unstable (rustc_private)
target: Config
Unstable (rustc_private)
host: Target
Unstable (rustc_private)
opts: Options
Unstable (rustc_private)
cstore: Rc<CrateStore<'a> + 'static>
Unstable (rustc_private)
parse_sess: ParseSess
Unstable (rustc_private)
entry_fn: RefCell<Option<(u32, Span)>>
Unstable (rustc_private)
entry_type: Cell<Option<EntryFnType>>
Unstable (rustc_private)
plugin_registrar_fn: Cell<Option<u32>>
Unstable (rustc_private)
default_sysroot: Option<PathBuf>
Unstable (rustc_private)
local_crate_source_file: Option<PathBuf>
Unstable (rustc_private)
working_dir: PathBuf
Unstable (rustc_private)
lint_store: RefCell<LintStore>
Unstable (rustc_private)
lints: RefCell<HashMap<u32Vec<(LintId, Span, String)>, BuildHasherDefault<FnvHasher>>>
Unstable (rustc_private)
plugin_llvm_passes: RefCell<Vec<String>>
Unstable (rustc_private)
mir_passes: RefCell<Passes>
Unstable (rustc_private)
plugin_attributes: RefCell<Vec<(String, AttributeType)>>
Unstable (rustc_private)
crate_types: RefCell<Vec<CrateType>>
Unstable (rustc_private)
dependency_formats: RefCell<HashMap<CrateTypeVec<Linkage>, BuildHasherDefault<FnvHasher>>>
Unstable (rustc_private)
crate_disambiguator: Cell<Name>
Unstable (rustc_private)
features: RefCell<Features>
Unstable (rustc_private)
recursion_limit: Cell<usize>
Unstable (rustc_private)

The maximum recursion limit for potentially infinitely recursive operations such as auto-dereference and monomorphization.

injected_allocator: Cell<Option<u32>>
Unstable (rustc_private)

The metadata::creader module may inject an allocator/panic_runtime dependency if it didn't already find one, and this tracks what was injected.

injected_panic_runtime: Cell<Option<u32>>
Unstable (rustc_private)
available_macros: RefCell<HashSet<NameRandomState>>
Unstable (rustc_private)

Names of all bang-style macros and syntax extensions available in this crate

imported_macro_spans: RefCell<HashMap<Span(String, Span)RandomState>>
Unstable (rustc_private)

Map from imported macro spans (which consist of the localized span for the macro body) to the macro name and defintion span in the source crate.

Methods

impl Session

fn struct_span_warn<S>(&'a self, sp: S, msg: &str) -> DiagnosticBuilder<'a> where S: Into<MultiSpan>

fn struct_span_warn_with_code<S>(&'a self, sp: S, msg: &str, code: &str) -> DiagnosticBuilder<'a> where S: Into<MultiSpan>

fn struct_warn(&'a self, msg: &str) -> DiagnosticBuilder<'a>

fn struct_span_err<S>(&'a self, sp: S, msg: &str) -> DiagnosticBuilder<'a> where S: Into<MultiSpan>

fn struct_span_err_with_code<S>(&'a self, sp: S, msg: &str, code: &str) -> DiagnosticBuilder<'a> where S: Into<MultiSpan>

fn struct_err(&'a self, msg: &str) -> DiagnosticBuilder<'a>

fn struct_span_fatal<S>(&'a self, sp: S, msg: &str) -> DiagnosticBuilder<'a> where S: Into<MultiSpan>

fn struct_span_fatal_with_code<S>(&'a self, sp: S, msg: &str, code: &str) -> DiagnosticBuilder<'a> where S: Into<MultiSpan>

fn struct_fatal(&'a self, msg: &str) -> DiagnosticBuilder<'a>

fn span_fatal<S>(&self, sp: S, msg: &str) -> ! where S: Into<MultiSpan>

fn span_fatal_with_code<S>(&self, sp: S, msg: &str, code: &str) -> ! where S: Into<MultiSpan>

fn fatal(&self, msg: &str) -> !

fn span_err_or_warn<S>(&self, is_warning: bool, sp: S, msg: &str) where S: Into<MultiSpan>

fn span_err<S>(&self, sp: S, msg: &str) where S: Into<MultiSpan>

fn span_err_with_code<S>(&self, sp: S, msg: &str, code: &str) where S: Into<MultiSpan>

fn err(&self, msg: &str)

fn err_count(&self) -> usize

fn has_errors(&self) -> bool

fn abort_if_errors(&self)

fn track_errors<F, T>(&self, f: F) -> Result<T, usize> where F: FnOnce() -> T

fn span_warn<S>(&self, sp: S, msg: &str) where S: Into<MultiSpan>

fn span_warn_with_code<S>(&self, sp: S, msg: &str, code: &str) where S: Into<MultiSpan>

fn warn(&self, msg: &str)

fn opt_span_warn<S>(&self, opt_sp: Option<S>, msg: &str) where S: Into<MultiSpan>

fn delay_span_bug<S>(&self, sp: S, msg: &str) where S: Into<MultiSpan>

Unstable (rustc_private)

Delay a span_bug() call until abort_if_errors()

fn note_without_error(&self, msg: &str)

fn span_note_without_error<S>(&self, sp: S, msg: &str) where S: Into<MultiSpan>

fn span_unimpl<S>(&self, sp: S, msg: &str) -> ! where S: Into<MultiSpan>

fn unimpl(&self, msg: &str) -> !

fn add_lint(&self, lint: &'static Lint, id: u32, sp: Span, msg: String)

fn reserve_node_ids(&self, count: u32) -> u32

fn diagnostic(&'a self) -> &'a Handler

fn codemap(&'a self) -> &'a CodeMap

fn verbose(&self) -> bool

fn time_passes(&self) -> bool

fn count_llvm_insns(&self) -> bool

fn count_type_sizes(&self) -> bool

fn time_llvm_passes(&self) -> bool

fn trans_stats(&self) -> bool

fn meta_stats(&self) -> bool

fn asm_comments(&self) -> bool

fn no_verify(&self) -> bool

fn borrowck_stats(&self) -> bool

fn print_llvm_passes(&self) -> bool

fn lto(&self) -> bool

fn no_landing_pads(&self) -> bool

fn unstable_options(&self) -> bool

fn print_enum_sizes(&self) -> bool

fn nonzeroing_move_hints(&self) -> bool

fn sysroot(&'a self) -> &'a Path

fn target_filesearch(&self, kind: PathKind) -> FileSearch

fn host_filesearch(&self, kind: PathKind) -> FileSearch

Trait Implementations

impl NodeIdAssigner for Session

fn next_node_id(&self) -> u32

fn peek_node_id(&self) -> u32

fn diagnostic(&self) -> &Handler