]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_session/src/lib.rs
New upstream version 1.75.0+dfsg1
[rustc.git] / compiler / rustc_session / src / lib.rs
1 #![feature(if_let_guard)]
2 #![feature(let_chains)]
3 #![feature(min_specialization)]
4 #![feature(never_type)]
5 #![feature(lazy_cell)]
6 #![feature(option_get_or_insert_default)]
7 #![feature(rustc_attrs)]
8 #![feature(map_many_mut)]
9 #![feature(iter_intersperse)]
10 #![recursion_limit = "256"]
11 #![allow(rustc::potential_query_instability)]
12 #![deny(rustc::untranslatable_diagnostic)]
13 #![deny(rustc::diagnostic_outside_of_impl)]
14 #![allow(internal_features)]
15
16 #[macro_use]
17 extern crate rustc_macros;
18 pub mod errors;
19
20 #[macro_use]
21 extern crate tracing;
22
23 use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
24 use rustc_fluent_macro::fluent_messages;
25
26 pub mod utils;
27 pub use lint::{declare_lint, declare_lint_pass, declare_tool_lint, impl_lint_pass};
28 pub use rustc_lint_defs as lint;
29 pub mod parse;
30
31 pub mod code_stats;
32 #[macro_use]
33 pub mod config;
34 pub mod cstore;
35 pub mod filesearch;
36 mod options;
37 pub mod search_paths;
38
39 mod session;
40 pub use session::*;
41
42 pub mod output;
43
44 pub use getopts;
45
46 mod version;
47 pub use version::RustcVersion;
48
49 fluent_messages! { "../messages.ftl" }
50
51 /// Requirements for a `StableHashingContext` to be used in this crate.
52 /// This is a hack to allow using the `HashStable_Generic` derive macro
53 /// instead of implementing everything in `rustc_middle`.
54 pub trait HashStableContext: rustc_ast::HashStableContext + rustc_hir::HashStableContext {}