1
Fork 0

Add a Rayon thread pool

This commit is contained in:
John Kåre Alsaker 2018-04-26 00:49:52 +02:00
parent 3df199680a
commit 022dff47e3
13 changed files with 430 additions and 344 deletions

View file

@ -697,7 +697,7 @@ impl<'a> FromIterator<&'a DocFragment> for String {
pub struct Attributes {
pub doc_strings: Vec<DocFragment>,
pub other_attrs: Vec<ast::Attribute>,
pub cfg: Option<Rc<Cfg>>,
pub cfg: Option<Arc<Cfg>>,
pub span: Option<syntax_pos::Span>,
/// map from Rust paths to resolved defs and potential URL fragments
pub links: Vec<(String, Option<DefId>, Option<String>)>,
@ -848,7 +848,7 @@ impl Attributes {
Attributes {
doc_strings,
other_attrs,
cfg: if cfg == Cfg::True { None } else { Some(Rc::new(cfg)) },
cfg: if cfg == Cfg::True { None } else { Some(Arc::new(cfg)) },
span: sp,
links: vec![],
}