Skip to content

Commit

Permalink
Parallel rustc needs synchronizing smart pointer cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Feb 11, 2019
1 parent b0cf52f commit bbe524d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/librustc/hir/lowering.rs
Expand Up @@ -44,6 +44,7 @@ use crate::middle::cstore::CrateStore;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::indexed_vec::IndexVec;
use rustc_data_structures::thin_vec::ThinVec;
use rustc_data_structures::sync::Lrc;
use crate::session::Session;
use crate::session::config::nightly_options;
use crate::util::common::FN_OUTPUT_NAME;
Expand All @@ -52,7 +53,6 @@ use crate::util::nodemap::{DefIdMap, NodeMap};
use std::collections::{BTreeSet, BTreeMap};
use std::fmt::Debug;
use std::mem;
use std::rc::Rc;
use smallvec::SmallVec;
use syntax::attr;
use syntax::ast;
Expand Down Expand Up @@ -688,7 +688,7 @@ impl<'a> LoweringContext<'a> {
&self,
reason: CompilerDesugaringKind,
span: Span,
allow_internal_unstable: Option<Rc<[Symbol]>>,
allow_internal_unstable: Option<Lrc<[Symbol]>>,
) -> Span {
let mark = Mark::fresh(Mark::root());
mark.set_expn_info(source_map::ExpnInfo {
Expand Down
6 changes: 3 additions & 3 deletions src/libsyntax/ext/base.rs
Expand Up @@ -622,7 +622,7 @@ pub enum SyntaxExtension {
ProcMacro {
expander: Box<dyn ProcMacro + sync::Sync + sync::Send>,
/// Whitelist of unstable features that are treated as stable inside this macro
allow_internal_unstable: Option<Rc<[Symbol]>>,
allow_internal_unstable: Option<Lrc<[Symbol]>>,
edition: Edition,
},

Expand All @@ -642,7 +642,7 @@ pub enum SyntaxExtension {
/// directly use `#[unstable]` things.
///
/// Only allows things that require a feature gate in the given whitelist
allow_internal_unstable: Option<Rc<[Symbol]>>,
allow_internal_unstable: Option<Lrc<[Symbol]>>,
/// Whether the contents of the macro can use `unsafe`
/// without triggering the `unsafe_code` lint.
allow_internal_unsafe: bool,
Expand All @@ -660,7 +660,7 @@ pub enum SyntaxExtension {
IdentTT {
expander: Box<dyn IdentMacroExpander + sync::Sync + sync::Send>,
span: Option<Span>,
allow_internal_unstable: Option<Rc<[Symbol]>>,
allow_internal_unstable: Option<Lrc<[Symbol]>>,
},

/// An attribute-like procedural macro. TokenStream -> TokenStream.
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax_pos/hygiene.rs
Expand Up @@ -12,8 +12,8 @@ use crate::symbol::{keywords, Symbol};

use serialize::{Encodable, Decodable, Encoder, Decoder};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::Lrc;
use std::{fmt, mem};
use std::rc::Rc;

/// A SyntaxContext represents a chain of macro expansions (represented by marks).
#[derive(Clone, Copy, PartialEq, Eq, Default, PartialOrd, Ord, Hash)]
Expand Down Expand Up @@ -554,7 +554,7 @@ pub struct ExpnInfo {
/// List of #[unstable]/feature-gated features that the macro is allowed to use
/// internally without forcing the whole crate to opt-in
/// to them.
pub allow_internal_unstable: Option<Rc<[Symbol]>>,
pub allow_internal_unstable: Option<Lrc<[Symbol]>>,
/// Whether the macro is allowed to use `unsafe` internally
/// even if the user crate has `#![forbid(unsafe_code)]`.
pub allow_internal_unsafe: bool,
Expand Down

0 comments on commit bbe524d

Please sign in to comment.