From 550d7fbe3cbf2af4a47fca6c9bbefaf798cd7b7b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 16:46:20 +0200 Subject: Rename ra_tt -> tt --- crates/ra_proc_macro/src/lib.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'crates/ra_proc_macro/src/lib.rs') diff --git a/crates/ra_proc_macro/src/lib.rs b/crates/ra_proc_macro/src/lib.rs index 004943b9e..15db57eb2 100644 --- a/crates/ra_proc_macro/src/lib.rs +++ b/crates/ra_proc_macro/src/lib.rs @@ -9,8 +9,6 @@ mod rpc; mod process; pub mod msg; -use process::{ProcMacroProcessSrv, ProcMacroProcessThread}; -use ra_tt::{SmolStr, Subtree}; use std::{ ffi::OsStr, io, @@ -18,6 +16,10 @@ use std::{ sync::Arc, }; +use tt::{SmolStr, Subtree}; + +use crate::process::{ProcMacroProcessSrv, ProcMacroProcessThread}; + pub use rpc::{ExpansionResult, ExpansionTask, ListMacrosResult, ListMacrosTask, ProcMacroKind}; #[derive(Debug, Clone)] @@ -36,12 +38,12 @@ impl PartialEq for ProcMacroProcessExpander { } } -impl ra_tt::TokenExpander for ProcMacroProcessExpander { +impl tt::TokenExpander for ProcMacroProcessExpander { fn expand( &self, subtree: &Subtree, _attr: Option<&Subtree>, - ) -> Result { + ) -> Result { self.process.custom_derive(&self.dylib_path, subtree, &self.name) } } @@ -72,10 +74,7 @@ impl ProcMacroClient { ProcMacroClient { kind: ProcMacroClientKind::Dummy } } - pub fn by_dylib_path( - &self, - dylib_path: &Path, - ) -> Vec<(SmolStr, Arc)> { + pub fn by_dylib_path(&self, dylib_path: &Path) -> Vec<(SmolStr, Arc)> { match &self.kind { ProcMacroClientKind::Dummy => vec![], ProcMacroClientKind::Process { process, .. } => { @@ -94,7 +93,7 @@ impl ProcMacroClient { match kind { ProcMacroKind::CustomDerive => { let name = SmolStr::new(&name); - let expander: Arc = + let expander: Arc = Arc::new(ProcMacroProcessExpander { process: process.clone(), name: name.clone(), -- cgit v1.2.3