Skip to content

Commit bbe524d

Browse files
committed
Parallel rustc needs synchronizing smart pointer cloning
1 parent b0cf52f commit bbe524d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/librustc/hir/lowering.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use crate::middle::cstore::CrateStore;
4444
use rustc_data_structures::fx::FxHashSet;
4545
use rustc_data_structures::indexed_vec::IndexVec;
4646
use rustc_data_structures::thin_vec::ThinVec;
47+
use rustc_data_structures::sync::Lrc;
4748
use crate::session::Session;
4849
use crate::session::config::nightly_options;
4950
use crate::util::common::FN_OUTPUT_NAME;
@@ -52,7 +53,6 @@ use crate::util::nodemap::{DefIdMap, NodeMap};
5253
use std::collections::{BTreeSet, BTreeMap};
5354
use std::fmt::Debug;
5455
use std::mem;
55-
use std::rc::Rc;
5656
use smallvec::SmallVec;
5757
use syntax::attr;
5858
use syntax::ast;
@@ -688,7 +688,7 @@ impl<'a> LoweringContext<'a> {
688688
&self,
689689
reason: CompilerDesugaringKind,
690690
span: Span,
691-
allow_internal_unstable: Option<Rc<[Symbol]>>,
691+
allow_internal_unstable: Option<Lrc<[Symbol]>>,
692692
) -> Span {
693693
let mark = Mark::fresh(Mark::root());
694694
mark.set_expn_info(source_map::ExpnInfo {

src/libsyntax/ext/base.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ pub enum SyntaxExtension {
622622
ProcMacro {
623623
expander: Box<dyn ProcMacro + sync::Sync + sync::Send>,
624624
/// Whitelist of unstable features that are treated as stable inside this macro
625-
allow_internal_unstable: Option<Rc<[Symbol]>>,
625+
allow_internal_unstable: Option<Lrc<[Symbol]>>,
626626
edition: Edition,
627627
},
628628

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

666666
/// An attribute-like procedural macro. TokenStream -> TokenStream.

src/libsyntax_pos/hygiene.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use crate::symbol::{keywords, Symbol};
1212

1313
use serialize::{Encodable, Decodable, Encoder, Decoder};
1414
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
15+
use rustc_data_structures::sync::Lrc;
1516
use std::{fmt, mem};
16-
use std::rc::Rc;
1717

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

0 commit comments

Comments
 (0)