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 | #![allow(internal_features)] |
9 | #![cfg_attr(doc, recursion_limit = "256")] // FIXME(nnethercote): will be removed by #124141 |
10 | #![doc( |
11 | html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/", |
12 | test(attr(deny(warnings))) |
13 | )] |
14 | #![doc(rust_logo)] |
15 | #![feature(associated_type_defaults)] |
16 | #![feature(box_patterns)] |
17 | #![feature(if_let_guard)] |
18 | #![feature(let_chains)] |
19 | #![feature(negative_impls)] |
20 | #![feature(never_type)] |
21 | #![feature(rustdoc_internals)] |
22 | #![feature(stmt_expr_attributes)] |
23 | // tidy-alphabetical-end |
24 | |
25 | pub mod util { |
26 | pub mod case; |
27 | pub mod classify; |
28 | pub mod comments; |
29 | pub mod literal; |
30 | pub mod parser; |
31 | pub mod unicode; |
32 | } |
33 | |
34 | pub mod ast; |
35 | pub mod ast_traits; |
36 | pub mod attr; |
37 | pub mod entry; |
38 | pub mod expand; |
39 | pub mod format; |
40 | pub mod mut_visit; |
41 | pub mod node_id; |
42 | pub mod ptr; |
43 | pub mod token; |
44 | pub mod tokenstream; |
45 | pub mod visit; |
46 | |
47 | pub use self::ast::*; |
48 | pub use self::ast_traits::{AstDeref, AstNodeWrapper, HasAttrs, HasNodeId, HasTokens}; |
49 | |
50 | /// Requirements for a `StableHashingContext` to be used in this crate. |
51 | /// This is a hack to allow using the `HashStable_Generic` derive macro |
52 | /// instead of implementing everything in `rustc_middle`. |
53 | pub trait HashStableContext: rustc_span::HashStableContext {} |
54 |
Definitions
Learn Rust with the experts
Find out more