Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Feb 17, 2024
1 parent 033d5dc commit 7819c5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 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"
Expand Down
6 changes: 1 addition & 5 deletions src/lib.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -2517,7 +2514,6 @@ impl Folder for StripUnchecked {

struct MyVisitor<'b> {
parse_sess: &'b ParseSess,
features: &'b RefCell<Features>,
map: &'b mut HashMap<Name, Rc<SyntaxExtension>>,
}

Expand All @@ -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);
Expand Down

0 comments on commit 7819c5b

Please sign in to comment.