rustc_ast/lib.rs
1//! The Rust Abstract Syntax Tree (AST).
2//!
3//! # Note
4//!
5//! This API is completely unstable and subject to change.
6
7// tidy-alphabetical-start
8#![doc(test(attr(deny(warnings), allow(internal_features))))]
9#![feature(associated_type_defaults)]
10#![feature(box_patterns)]
11#![feature(iter_order_by)]
12#![feature(macro_metavar_expr)]
13#![recursion_limit = "256"]
14// tidy-alphabetical-end
15
16pub mod util {
17 pub mod case;
18 pub mod classify;
19 pub mod comments;
20 pub mod literal;
21 pub mod parser;
22 pub mod unicode;
23}
24
25pub mod ast;
26pub mod ast_traits;
27pub mod attr;
28pub mod entry;
29pub mod expand;
30pub mod format;
31pub mod mut_visit;
32pub mod node_id;
33pub mod token;
34pub mod tokenstream;
35pub mod visit;
36
37pub use self::ast::*;
38pub use self::ast_traits::{AstNodeWrapper, HasAttrs, HasNodeId, HasTokens};
39
40/// Requirements for a `StableHashingContext` to be used in this crate.
41/// This is a hack to allow using the `HashStable_Generic` derive macro
42/// instead of implementing everything in `rustc_middle`.
43pub trait HashStableContext: rustc_span::HashStableContext {}