]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_expand/src/lib.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / compiler / rustc_expand / src / lib.rs
1 #![feature(array_windows)]
2 #![feature(associated_type_bounds)]
3 #![feature(associated_type_defaults)]
4 #![feature(if_let_guard)]
5 #![feature(let_chains)]
6 #![feature(macro_metavar_expr)]
7 #![feature(proc_macro_diagnostic)]
8 #![feature(proc_macro_internals)]
9 #![feature(proc_macro_span)]
10 #![feature(rustc_attrs)]
11 #![feature(try_blocks)]
12 #![recursion_limit = "256"]
13 #![deny(rustc::untranslatable_diagnostic)]
14
15 #[macro_use]
16 extern crate rustc_macros;
17
18 #[macro_use]
19 extern crate tracing;
20
21 extern crate proc_macro as pm;
22
23 mod placeholders;
24 mod proc_macro_server;
25
26 pub use mbe::macro_rules::compile_declarative_macro;
27 pub(crate) use rustc_span::hygiene;
28 pub mod base;
29 pub mod build;
30 #[macro_use]
31 pub mod config;
32 pub mod errors;
33 pub mod expand;
34 pub mod module;
35
36 // FIXME(Nilstrieb) Translate proc_macro diagnostics
37 #[allow(rustc::untranslatable_diagnostic)]
38 pub mod proc_macro;
39
40 // FIXME(Nilstrieb) Translate macro_rules diagnostics
41 #[allow(rustc::untranslatable_diagnostic)]
42 pub(crate) mod mbe;
43
44 // HACK(Centril, #64197): These shouldn't really be here.
45 // Rather, they should be with their respective modules which are defined in other crates.
46 // However, since for now constructing a `ParseSess` sorta requires `config` from this crate,
47 // these tests will need to live here in the interim.
48
49 #[cfg(test)]
50 mod tests;
51 #[cfg(test)]
52 mod parse {
53     mod tests;
54 }
55 #[cfg(test)]
56 mod tokenstream {
57     mod tests;
58 }
59 #[cfg(test)]
60 mod mut_visit {
61     mod tests;
62 }