mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-18 17:40:29 +00:00
internal: improve compilation critical path a bit
This commit is contained in:
parent
0dabcf0044
commit
c639fe333f
7 changed files with 12 additions and 34 deletions
|
@ -3,7 +3,6 @@
|
|||
use crate::dylib;
|
||||
use crate::ProcMacroSrv;
|
||||
use expect_test::Expect;
|
||||
use paths::AbsPathBuf;
|
||||
use proc_macro_api::ListMacrosTask;
|
||||
use std::str::FromStr;
|
||||
|
||||
|
@ -42,8 +41,7 @@ fn assert_expand_impl(macro_name: &str, input: &str, attr: Option<&str>, expect:
|
|||
}
|
||||
|
||||
pub fn list() -> Vec<String> {
|
||||
let path = AbsPathBuf::assert(fixtures::proc_macro_test_dylib_path());
|
||||
let task = ListMacrosTask { lib: path };
|
||||
let task = ListMacrosTask { lib: fixtures::proc_macro_test_dylib_path() };
|
||||
let mut srv = ProcMacroSrv::default();
|
||||
let res = srv.list_macros(&task).unwrap();
|
||||
res.macros.into_iter().map(|(name, kind)| format!("{} [{:?}]", name, kind)).collect()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue