From 7819c5b641995447b56f74ce7ab647b6bd7a7541 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 17 Feb 2024 14:22:49 +0900 Subject: [PATCH] Fix build --- Cargo.toml | 2 +- src/lib.rs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 208f319..4aafac9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ctest2" -version = "0.4.7" +version = "0.4.8" license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/JohnTitor/ctest2" diff --git a/src/lib.rs b/src/lib.rs index 241658c..d3c4b1a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,6 @@ use garando_syntax as syntax; -use std::cell::RefCell; use std::collections::{HashMap, HashSet}; use std::env; use std::fs::File; @@ -2431,11 +2430,9 @@ impl<'a> Resolver for MyResolver<'a> { fn visit_expansion(&mut self, _invoc: Mark, expansion: &Expansion, _derives: &[Mark]) { if let Expansion::Items(ref items) = expansion { - let features = RefCell::new(Features::new()); for item in items.iter() { MyVisitor { parse_sess: self.parse_sess, - features: &features, map: &mut self.map, } .visit_item(item); @@ -2517,7 +2514,6 @@ impl Folder for StripUnchecked { struct MyVisitor<'b> { parse_sess: &'b ParseSess, - features: &'b RefCell, map: &'b mut HashMap>, } @@ -2526,7 +2522,7 @@ impl<'a, 'b> Visitor<'a> for MyVisitor<'b> { if let ast::ItemKind::MacroDef(..) = item.node { self.map.insert( item.ident.name, - Rc::new(macro_rules::compile(self.parse_sess, self.features, item)), + Rc::new(macro_rules::compile(self.parse_sess, item)), ); } visit::walk_item(self, item);