Merge pull request #591 from serde-rs/sess
Not safe to share Spans from one ParseSess to another
This commit is contained in:
commit
cafa02d9b4
@ -169,8 +169,8 @@ macro_rules! shim {
|
||||
use syntax::parse;
|
||||
let name = stringify!($name).to_string();
|
||||
let cfg = Vec::new();
|
||||
let sess = parse::ParseSess::new();
|
||||
let impl_item = parse::parse_item_from_source_str(name, expanded, cfg, &sess);
|
||||
let sess = cx.parse_sess;
|
||||
let impl_item = parse::parse_item_from_source_str(name, expanded, cfg, sess);
|
||||
push(::syntax::ext::base::Annotatable::Item(impl_item.unwrap().unwrap()));
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user