Move TokenExpander to base_db and rename it
It's only used to break the dependency to proc_macro_api
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//! `tt` crate defines a `TokenTree` data structure: this is the interface (both
|
||||
//! input and output) of macros. It closely mirrors `proc_macro` crate's
|
||||
//! `TokenTree`.
|
||||
use std::{fmt, panic::RefUnwindSafe};
|
||||
use std::fmt;
|
||||
|
||||
use stdx::impl_from;
|
||||
|
||||
@@ -247,8 +247,3 @@ impl fmt::Display for ExpansionError {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait TokenExpander: fmt::Debug + Send + Sync + RefUnwindSafe {
|
||||
fn expand(&self, subtree: &Subtree, attrs: Option<&Subtree>)
|
||||
-> Result<Subtree, ExpansionError>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user