2023-11-13 07:39:17 -05:00
|
|
|
#![doc(rust_logo)]
|
|
|
|
#![feature(rustdoc_internals)]
|
2022-06-09 04:46:51 +02:00
|
|
|
#![feature(array_windows)]
|
2022-01-05 14:15:44 +08:00
|
|
|
#![feature(associated_type_bounds)]
|
|
|
|
#![feature(associated_type_defaults)]
|
2021-08-16 17:29:49 +02:00
|
|
|
#![feature(if_let_guard)]
|
2022-08-20 20:40:08 +02:00
|
|
|
#![feature(let_chains)]
|
2022-04-07 08:13:41 -03:00
|
|
|
#![feature(macro_metavar_expr)]
|
2019-10-16 10:59:30 +02:00
|
|
|
#![feature(proc_macro_diagnostic)]
|
|
|
|
#![feature(proc_macro_internals)]
|
|
|
|
#![feature(proc_macro_span)]
|
2020-03-08 22:21:37 +01:00
|
|
|
#![feature(try_blocks)]
|
2024-02-06 09:51:39 +11:00
|
|
|
#![allow(rustc::diagnostic_outside_of_impl)]
|
2023-08-22 07:06:38 -04:00
|
|
|
#![allow(internal_features)]
|
2019-10-16 10:59:30 +02:00
|
|
|
|
2020-06-11 15:49:57 +01:00
|
|
|
#[macro_use]
|
|
|
|
extern crate rustc_macros;
|
|
|
|
|
2022-08-31 13:09:26 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate tracing;
|
|
|
|
|
2019-10-16 10:59:30 +02:00
|
|
|
extern crate proc_macro as pm;
|
|
|
|
|
|
|
|
mod placeholders;
|
|
|
|
mod proc_macro_server;
|
|
|
|
|
|
|
|
pub use mbe::macro_rules::compile_declarative_macro;
|
2022-05-20 19:51:09 -04:00
|
|
|
pub(crate) use rustc_span::hygiene;
|
2019-10-16 10:59:30 +02:00
|
|
|
pub mod base;
|
|
|
|
pub mod build;
|
2020-03-08 22:32:25 +01:00
|
|
|
#[macro_use]
|
|
|
|
pub mod config;
|
2022-08-17 11:18:19 -03:00
|
|
|
pub mod errors;
|
2019-10-16 10:59:30 +02:00
|
|
|
pub mod expand;
|
2020-03-08 22:21:37 +01:00
|
|
|
pub mod module;
|
2022-11-15 14:24:33 +01:00
|
|
|
|
|
|
|
// FIXME(Nilstrieb) Translate proc_macro diagnostics
|
|
|
|
#[allow(rustc::untranslatable_diagnostic)]
|
2019-10-16 10:59:30 +02:00
|
|
|
pub mod proc_macro;
|
|
|
|
|
2022-11-15 14:24:33 +01:00
|
|
|
// FIXME(Nilstrieb) Translate macro_rules diagnostics
|
|
|
|
#[allow(rustc::untranslatable_diagnostic)]
|
2022-05-20 19:51:09 -04:00
|
|
|
pub(crate) mod mbe;
|
2019-10-10 10:26:10 +02:00
|
|
|
|
|
|
|
// HACK(Centril, #64197): These shouldn't really be here.
|
|
|
|
// Rather, they should be with their respective modules which are defined in other crates.
|
|
|
|
// However, since for now constructing a `ParseSess` sorta requires `config` from this crate,
|
2022-03-30 01:39:38 -04:00
|
|
|
// these tests will need to live here in the interim.
|
2019-10-10 10:26:10 +02:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests;
|
|
|
|
#[cfg(test)]
|
|
|
|
mod parse {
|
|
|
|
mod tests;
|
|
|
|
}
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tokenstream {
|
|
|
|
mod tests;
|
|
|
|
}
|
|
|
|
#[cfg(test)]
|
|
|
|
mod mut_visit {
|
|
|
|
mod tests;
|
|
|
|
}
|
2022-10-13 10:13:02 +01:00
|
|
|
|
2023-11-22 09:53:07 +11:00
|
|
|
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|