Merge pull request #591 from serde-rs/sess

Not safe to share Spans from one ParseSess to another
This commit is contained in:
David Tolnay
2016-10-18 21:41:05 -07:00
committed by GitHub
+2 -2
View File
@@ -169,8 +169,8 @@ macro_rules! shim {
use syntax::parse; use syntax::parse;
let name = stringify!($name).to_string(); let name = stringify!($name).to_string();
let cfg = Vec::new(); let cfg = Vec::new();
let sess = parse::ParseSess::new(); let sess = cx.parse_sess;
let impl_item = parse::parse_item_from_source_str(name, expanded, cfg, &sess); let impl_item = parse::parse_item_from_source_str(name, expanded, cfg, sess);
push(::syntax::ext::base::Annotatable::Item(impl_item.unwrap().unwrap())); push(::syntax::ext::base::Annotatable::Item(impl_item.unwrap().unwrap()));
} }
}; };