Struct rustc_lint::session::Session [−] [src]

pub struct Session {
    pub target: Config,
    pub host: Target,
    pub opts: Options,
    pub cstore: CStore,
    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)>, DefaultState<FnvHasher>>>,
    pub plugin_llvm_passes: RefCell<Vec<String>>,
    pub crate_types: RefCell<Vec<CrateType>>,
    pub crate_metadata: RefCell<Vec<String>>,
    pub features: RefCell<Features>,
    pub delayed_span_bug: RefCell<Option<(Span, String)>>,
    pub recursion_limit: Cell<usize>,
    pub can_print_warnings: bool,
}
Unstable

Fields

target
Unstable
host
Unstable
opts
Unstable
cstore
Unstable
parse_sess
Unstable
entry_fn
Unstable
entry_type
Unstable
plugin_registrar_fn
Unstable
default_sysroot
Unstable
local_crate_source_file
Unstable
working_dir
Unstable
lint_store
Unstable
lints
Unstable
plugin_llvm_passes
Unstable
crate_types
Unstable
crate_metadata
Unstable
features
Unstable
delayed_span_bug
Unstable
recursion_limit
Unstable

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

can_print_warnings
Unstable

Methods

impl Session

fn span_fatal(&self, sp: Span, msg: &str) -> !

Unstable

fn span_fatal_with_code(&self, sp: Span, msg: &str, code: &str) -> !

Unstable

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

Unstable

fn span_err(&self, sp: Span, msg: &str)

Unstable

fn span_err_with_code(&self, sp: Span, msg: &str, code: &str)

Unstable

fn err(&self, msg: &str)

Unstable

fn err_count(&self) -> usize

Unstable

fn has_errors(&self) -> bool

Unstable

fn abort_if_errors(&self)

Unstable

fn span_warn(&self, sp: Span, msg: &str)

Unstable

fn span_warn_with_code(&self, sp: Span, msg: &str, code: &str)

Unstable

fn warn(&self, msg: &str)

Unstable

fn opt_span_warn(&self, opt_sp: Option<Span>, msg: &str)

Unstable

fn span_note(&self, sp: Span, msg: &str)

Unstable

fn span_end_note(&self, sp: Span, msg: &str)

Unstable

fn span_suggestion(&self, sp: Span, msg: &str, suggestion: String)

Unstable

Prints out a message with a suggested edit of the code.

See diagnostic::RenderSpan::Suggestion for more information.

fn span_help(&self, sp: Span, msg: &str)

Unstable

fn fileline_note(&self, sp: Span, msg: &str)

Unstable

fn fileline_help(&self, sp: Span, msg: &str)

Unstable

fn note(&self, msg: &str)

Unstable

fn help(&self, msg: &str)

Unstable

fn opt_span_bug(&self, opt_sp: Option<Span>, msg: &str) -> !

Unstable

fn delay_span_bug(&self, sp: Span, msg: &str)

Unstable

Delay a span_bug() call until abort_if_errors()

fn span_bug(&self, sp: Span, msg: &str) -> !

Unstable

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

Unstable

fn span_unimpl(&self, sp: Span, msg: &str) -> !

Unstable

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

Unstable

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

Unstable

fn next_node_id(&self) -> u32

Unstable

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

Unstable

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

Unstable

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

Unstable

fn impossible_case(&self, sp: Span, msg: &str) -> !

Unstable

fn verbose(&self) -> bool

Unstable

fn time_passes(&self) -> bool

Unstable

fn count_llvm_insns(&self) -> bool

Unstable

fn count_type_sizes(&self) -> bool

Unstable

fn time_llvm_passes(&self) -> bool

Unstable

fn trans_stats(&self) -> bool

Unstable

fn meta_stats(&self) -> bool

Unstable

fn asm_comments(&self) -> bool

Unstable

fn no_verify(&self) -> bool

Unstable

fn borrowck_stats(&self) -> bool

Unstable

fn print_llvm_passes(&self) -> bool

Unstable

fn lto(&self) -> bool

Unstable

fn no_landing_pads(&self) -> bool

Unstable

fn unstable_options(&self) -> bool

Unstable

fn print_enum_sizes(&self) -> bool

Unstable

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

Unstable

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

Unstable

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

Unstable