Struct rustc_lint::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<u32, Vec<(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<CrateType, Vec<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<Name, RandomState>>, 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<u32, Vec<(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<CrateType, Vec<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<Name, RandomState>>
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()