diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-12 23:16:09 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-17 22:29:15 +0300 |
| commit | a02b1d7e2bd329bee0ad2f6a3e281c2004325540 (patch) | |
| tree | 218af564850700e4f8a2a1d8ee04c18458384d84 /src/libsyntax/ast.rs | |
| parent | 636357b09a638661d1ed1473738038d8caa9a02e (diff) | |
| download | rust-a02b1d7e2bd329bee0ad2f6a3e281c2004325540.tar.gz rust-a02b1d7e2bd329bee0ad2f6a3e281c2004325540.zip | |
Add some docs + Fix rebase
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index eef7a6f8b4d..1f16b728cd2 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1877,13 +1877,19 @@ pub struct Variant_ { pub type Variant = Spanned<Variant_>; +/// Part of `use` item to the right of its prefix. #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum UseTreeKind { + /// `use prefix` or `use prefix as rename` Simple(Option<Ident>), + /// `use prefix::{...}` Nested(Vec<(UseTree, NodeId)>), + /// `use prefix::*` Glob, } +/// A tree of paths sharing common prefixes. +/// Used in `use` items both at top-level and inside of braces in import groups. #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct UseTree { pub prefix: Path, |
