diff --git a/src/lib.rs b/src/lib.rs index 5470f7655..824c7b6b5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,8 +19,8 @@ mod nom; #[macro_use] mod helper; -#[cfg(feature = "parsing")] -mod escape; +#[cfg(feature = "aster")] +pub mod aster; mod attr; pub use attr::{Attribute, AttrStyle, MetaItem, NestedMetaItem}; @@ -31,6 +31,9 @@ pub use constant::ConstExpr; mod data; pub use data::{Field, Variant, VariantData, Visibility}; +#[cfg(feature = "parsing")] +mod escape; + #[cfg(feature = "full")] mod expr; #[cfg(feature = "full")] @@ -43,11 +46,6 @@ pub use generics::{Generics, Lifetime, LifetimeDef, TraitBoundModifier, TyParam, #[cfg(feature = "printing")] pub use generics::{ImplGenerics, TyGenerics}; -#[cfg(feature = "full")] -mod krate; -#[cfg(feature = "full")] -pub use krate::Crate; - mod ident; pub use ident::Ident; @@ -58,6 +56,11 @@ pub use item::{Constness, Defaultness, FnArg, FnDecl, ForeignItemKind, ForeignIt ImplItem, ImplItemKind, ImplPolarity, Item, ItemKind, MethodSig, PathListItem, TraitItem, TraitItemKind, ViewPath}; +#[cfg(feature = "full")] +mod krate; +#[cfg(feature = "full")] +pub use krate::Crate; + mod lit; pub use lit::{FloatTy, IntTy, Lit, StrStyle}; @@ -85,9 +88,6 @@ pub use ty::{Abi, AngleBracketedParameterData, BareFnArg, BareFnTy, FunctionRetT Mutability, ParenthesizedParameterData, Path, PathParameters, PathSegment, PolyTraitRef, QSelf, Ty, TypeBinding, Unsafety}; -#[cfg(feature = "aster")] -pub mod aster; - #[cfg(feature = "visit")] pub mod visit;