]>
Commit | Line | Data |
---|---|---|
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 | use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage}; | |
24 | use rustc_macros::fluent_messages; | |
25 | ||
26 | mod placeholders; | |
27 | mod proc_macro_server; | |
28 | ||
29 | pub use mbe::macro_rules::compile_declarative_macro; | |
30 | pub(crate) use rustc_span::hygiene; | |
31 | pub mod base; | |
32 | pub mod build; | |
33 | #[macro_use] | |
34 | pub mod config; | |
35 | pub mod errors; | |
36 | pub mod expand; | |
37 | pub mod module; | |
38 | ||
39 | // FIXME(Nilstrieb) Translate proc_macro diagnostics | |
40 | #[allow(rustc::untranslatable_diagnostic)] | |
41 | pub mod proc_macro; | |
42 | ||
43 | // FIXME(Nilstrieb) Translate macro_rules diagnostics | |
44 | #[allow(rustc::untranslatable_diagnostic)] | |
45 | pub(crate) mod mbe; | |
46 | ||
47 | // HACK(Centril, #64197): These shouldn't really be here. | |
48 | // Rather, they should be with their respective modules which are defined in other crates. | |
49 | // However, since for now constructing a `ParseSess` sorta requires `config` from this crate, | |
50 | // these tests will need to live here in the interim. | |
51 | ||
52 | #[cfg(test)] | |
53 | mod tests; | |
54 | #[cfg(test)] | |
55 | mod parse { | |
56 | mod tests; | |
57 | } | |
58 | #[cfg(test)] | |
59 | mod tokenstream { | |
60 | mod tests; | |
61 | } | |
62 | #[cfg(test)] | |
63 | mod mut_visit { | |
64 | mod tests; | |
65 | } | |
66 | ||
67 | fluent_messages! { "../messages.ftl" } |