]> git.proxmox.com Git - rustc.git/blame_incremental - compiler/rustc_expand/src/lib.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / compiler / rustc_expand / src / lib.rs
... / ...
CommitLineData
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]
16extern crate rustc_macros;
17
18#[macro_use]
19extern crate tracing;
20
21extern crate proc_macro as pm;
22
23use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
24use rustc_macros::fluent_messages;
25
26mod placeholders;
27mod proc_macro_server;
28
29pub use mbe::macro_rules::compile_declarative_macro;
30pub(crate) use rustc_span::hygiene;
31pub mod base;
32pub mod build;
33#[macro_use]
34pub mod config;
35pub mod errors;
36pub mod expand;
37pub mod module;
38
39// FIXME(Nilstrieb) Translate proc_macro diagnostics
40#[allow(rustc::untranslatable_diagnostic)]
41pub mod proc_macro;
42
43// FIXME(Nilstrieb) Translate macro_rules diagnostics
44#[allow(rustc::untranslatable_diagnostic)]
45pub(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)]
53mod tests;
54#[cfg(test)]
55mod parse {
56 mod tests;
57}
58#[cfg(test)]
59mod tokenstream {
60 mod tests;
61}
62#[cfg(test)]
63mod mut_visit {
64 mod tests;
65}
66
67fluent_messages! { "../messages.ftl" }