Struct rustc::session::Session
[−]
[src]
pub struct Session { pub dep_graph: DepGraph, pub target: Config, pub host: Target, pub opts: Options, pub cstore: Rc<for<'a> CrateStore<'a>>, pub parse_sess: ParseSess, pub entry_fn: RefCell<Option<(NodeId, Span)>>, pub entry_type: Cell<Option<EntryFnType>>, pub plugin_registrar_fn: Cell<Option<NodeId>>, pub default_sysroot: Option<PathBuf>, pub local_crate_source_file: Option<PathBuf>, pub working_dir: PathBuf, pub lint_store: RefCell<LintStore>, pub lints: RefCell<NodeMap<Vec<(LintId, Span, String)>>>, 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<Dependencies>, pub crate_disambiguator: Cell<Name>, pub features: RefCell<Features>, pub recursion_limit: Cell<usize>, pub injected_allocator: Cell<Option<CrateNum>>, pub injected_panic_runtime: Cell<Option<CrateNum>>, pub available_macros: RefCell<HashSet<Name>>, pub imported_macro_spans: RefCell<HashMap<Span, (String, Span)>>, // 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<for<'a> CrateStore<'a>>
Unstable (
rustc_private
)parse_sess: ParseSess
Unstable (
rustc_private
)entry_fn: RefCell<Option<(NodeId, Span)>>
Unstable (
rustc_private
)entry_type: Cell<Option<EntryFnType>>
Unstable (
rustc_private
)plugin_registrar_fn: Cell<Option<NodeId>>
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<NodeMap<Vec<(LintId, Span, String)>>>
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<Dependencies>
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<CrateNum>>
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<CrateNum>>
Unstable (
rustc_private
)available_macros: RefCell<HashSet<Name>>
Unstable (
rustc_private
)Names of all bang-style macros and syntax extensions available in this crate
imported_macro_spans: RefCell<HashMap<Span, (String, Span)>>
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
[src]
fn struct_span_warn<'a, S: Into<MultiSpan>>(&'a self, sp: S, msg: &str) -> DiagnosticBuilder<'a>
fn struct_span_warn_with_code<'a, S: Into<MultiSpan>>(&'a self, sp: S, msg: &str, code: &str) -> DiagnosticBuilder<'a>
fn struct_warn<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a>
fn struct_span_err<'a, S: Into<MultiSpan>>(&'a self, sp: S, msg: &str) -> DiagnosticBuilder<'a>
fn struct_span_err_with_code<'a, S: Into<MultiSpan>>(&'a self, sp: S, msg: &str, code: &str) -> DiagnosticBuilder<'a>
fn struct_err<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a>
fn struct_span_fatal<'a, S: Into<MultiSpan>>(&'a self, sp: S, msg: &str) -> DiagnosticBuilder<'a>
fn struct_span_fatal_with_code<'a, S: Into<MultiSpan>>(&'a self, sp: S, msg: &str, code: &str) -> DiagnosticBuilder<'a>
fn struct_fatal<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a>
fn span_fatal<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> !
fn span_fatal_with_code<S: Into<MultiSpan>>(&self, sp: S, msg: &str, code: &str) -> !
fn fatal(&self, msg: &str) -> !
fn span_err_or_warn<S: Into<MultiSpan>>(&self, is_warning: bool, sp: S, msg: &str)
fn span_err<S: Into<MultiSpan>>(&self, sp: S, msg: &str)
fn span_err_with_code<S: Into<MultiSpan>>(&self, sp: S, msg: &str, code: &str)
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: Into<MultiSpan>>(&self, sp: S, msg: &str)
fn span_warn_with_code<S: Into<MultiSpan>>(&self, sp: S, msg: &str, code: &str)
fn warn(&self, msg: &str)
fn opt_span_warn<S: Into<MultiSpan>>(&self, opt_sp: Option<S>, msg: &str)
fn delay_span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: &str)
Unstable (
rustc_private
)Delay a span_bug() call until abort_if_errors()