Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/lib.rs')
-rw-r--r--crates/hir-expand/src/lib.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/hir-expand/src/lib.rs b/crates/hir-expand/src/lib.rs
index 5aafe6db52..ac1d1109f5 100644
--- a/crates/hir-expand/src/lib.rs
+++ b/crates/hir-expand/src/lib.rs
@@ -70,12 +70,17 @@ pub mod tt {
pub type Delimiter = ::tt::Delimiter<Span>;
pub type DelimSpan = ::tt::DelimSpan<Span>;
pub type Subtree = ::tt::Subtree<Span>;
- pub type SubtreeBuilder = ::tt::SubtreeBuilder<Span>;
pub type Leaf = ::tt::Leaf<Span>;
pub type Literal = ::tt::Literal<Span>;
pub type Punct = ::tt::Punct<Span>;
pub type Ident = ::tt::Ident<Span>;
pub type TokenTree = ::tt::TokenTree<Span>;
+ pub type TopSubtree = ::tt::TopSubtree<Span>;
+ pub type TopSubtreeBuilder = ::tt::TopSubtreeBuilder<Span>;
+ pub type TokenTreesView<'a> = ::tt::TokenTreesView<'a, Span>;
+ pub type SubtreeView<'a> = ::tt::SubtreeView<'a, Span>;
+ pub type TtElement<'a> = ::tt::iter::TtElement<'a, Span>;
+ pub type TtIter<'a> = ::tt::iter::TtIter<'a, Span>;
}
#[macro_export]
@@ -284,7 +289,7 @@ impl MacroDefKind {
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct EagerCallInfo {
/// The expanded argument of the eager macro.
- arg: Arc<tt::Subtree>,
+ arg: Arc<tt::TopSubtree>,
/// Call id of the eager macro's input file (this is the macro file for its fully expanded input).
arg_id: MacroCallId,
error: Option<ExpandError>,
@@ -320,7 +325,7 @@ pub enum MacroCallKind {
ast_id: AstId<ast::Item>,
// FIXME: This shouldn't be here, we can derive this from `invoc_attr_index`
// but we need to fix the `cfg_attr` handling first.
- attr_args: Option<Arc<tt::Subtree>>,
+ attr_args: Option<Arc<tt::TopSubtree>>,
/// Syntactical index of the invoking `#[attribute]`.
///
/// Outer attributes are counted first, then inner attributes. This does not support