Skip to content
Permalink
Browse files

Parallel rustc needs synchronizing smart pointer cloning

  • Loading branch information...
oli-obk committed Feb 8, 2019
1 parent b0cf52f commit bbe524d7c1a1028737a93c7c71c508a68363b681
Showing with 7 additions and 7 deletions.
  1. +2 −2 src/librustc/hir/lowering.rs
  2. +3 −3 src/libsyntax/ext/base.rs
  3. +2 −2 src/libsyntax_pos/hygiene.rs
@@ -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;
@@ -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;
@@ -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 {
@@ -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,
},

@@ -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,
@@ -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.
@@ -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)]
@@ -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,

0 comments on commit bbe524d

Please sign in to comment.
You can’t perform that action at this time.