Use interior mutability for loaded ProcMacrorv::expanders

This commit is contained in:
Lukas Wirth 2025-02-05 11:11:14 +01:00
parent 0e0dbd1497
commit 5ec0057418
3 changed files with 29 additions and 22 deletions

View file

@ -107,7 +107,7 @@ fn assert_expand_impl(
pub(crate) fn list() -> Vec<String> {
let dylib_path = proc_macro_test_dylib_path();
let env = EnvSnapshot::default();
let mut srv = ProcMacroSrv::new(&env);
let srv = ProcMacroSrv::new(&env);
let res = srv.list_macros(&dylib_path).unwrap();
res.into_iter().map(|(name, kind)| format!("{name} [{kind:?}]")).collect()
}