diff options
author | Jonas Schievink <[email protected]> | 2020-12-11 13:24:02 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-12-27 14:29:47 +0000 |
commit | 798968e1e3a7d9eafa0c27c857571cdc347c34a7 (patch) | |
tree | 79e82b07d8486f2d9b710706e5aacc07f25ddbb9 /crates/tt | |
parent | 0fd75c98ac81c9f6581712ec8802940e547315e3 (diff) |
Move TokenExpander to base_db and rename it
It's only used to break the dependency to proc_macro_api
Diffstat (limited to 'crates/tt')
-rw-r--r-- | crates/tt/src/lib.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/tt/src/lib.rs b/crates/tt/src/lib.rs index 6c1bf8d09..8301dc28a 100644 --- a/crates/tt/src/lib.rs +++ b/crates/tt/src/lib.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! `tt` crate defines a `TokenTree` data structure: this is the interface (both | 1 | //! `tt` crate defines a `TokenTree` data structure: this is the interface (both |
2 | //! input and output) of macros. It closely mirrors `proc_macro` crate's | 2 | //! input and output) of macros. It closely mirrors `proc_macro` crate's |
3 | //! `TokenTree`. | 3 | //! `TokenTree`. |
4 | use std::{fmt, panic::RefUnwindSafe}; | 4 | use std::fmt; |
5 | 5 | ||
6 | use stdx::impl_from; | 6 | use stdx::impl_from; |
7 | 7 | ||
@@ -247,8 +247,3 @@ impl fmt::Display for ExpansionError { | |||
247 | } | 247 | } |
248 | } | 248 | } |
249 | } | 249 | } |
250 | |||
251 | pub trait TokenExpander: fmt::Debug + Send + Sync + RefUnwindSafe { | ||
252 | fn expand(&self, subtree: &Subtree, attrs: Option<&Subtree>) | ||
253 | -> Result<Subtree, ExpansionError>; | ||
254 | } | ||