Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/base_db/src/input.rs')
-rw-r--r--crates/base_db/src/input.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs
index 671039e46b..c3730d0bbd 100644
--- a/crates/base_db/src/input.rs
+++ b/crates/base_db/src/input.rs
@@ -11,7 +11,7 @@ use std::{fmt, iter::FromIterator, ops, panic::RefUnwindSafe, str::FromStr, sync
use cfg::CfgOptions;
use rustc_hash::{FxHashMap, FxHashSet};
use syntax::SmolStr;
-use tt::{ExpansionError, Subtree};
+use tt::Subtree;
use vfs::{file_set::FileSet, FileId, VfsPath};
/// Files are grouped into source roots. A source root is a directory on the
@@ -163,7 +163,13 @@ pub trait ProcMacroExpander: fmt::Debug + Send + Sync + RefUnwindSafe {
subtree: &Subtree,
attrs: Option<&Subtree>,
env: &Env,
- ) -> Result<Subtree, ExpansionError>;
+ ) -> Result<Subtree, ProcMacroExpansionError>;
+}
+
+pub enum ProcMacroExpansionError {
+ Panic(String),
+ /// Things like "proc macro server was killed by OOM".
+ System(String),
}
#[derive(Debug, Clone)]