mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 00:11:00 +00:00
Merge pull request #591 from serde-rs/sess
Not safe to share Spans from one ParseSess to another
This commit is contained in:
@@ -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()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user