mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
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:
parent
0fd75c98ac
commit
798968e1e3
4 changed files with 12 additions and 12 deletions
|
@ -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>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue