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:
Jonas Schievink 2020-12-11 14:24:02 +01:00
parent 0fd75c98ac
commit 798968e1e3
4 changed files with 12 additions and 12 deletions

View file

@ -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>;
}