diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 15184ec9d27..43c756def88 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.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>, + allow_internal_unstable: Option>, ) -> Span { let mark = Mark::fresh(Mark::root()); mark.set_expn_info(source_map::ExpnInfo { diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 7c6303b3d40..f7225810aca 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -622,7 +622,7 @@ pub enum SyntaxExtension { ProcMacro { expander: Box, /// Whitelist of unstable features that are treated as stable inside this macro - allow_internal_unstable: Option>, + allow_internal_unstable: Option>, 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>, + allow_internal_unstable: Option>, /// 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, span: Option, - allow_internal_unstable: Option>, + allow_internal_unstable: Option>, }, /// An attribute-like procedural macro. TokenStream -> TokenStream. diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index fb9b4c9d70e..d5c0a2ca85f 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -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>, + pub allow_internal_unstable: Option>, /// Whether the macro is allowed to use `unsafe` internally /// even if the user crate has `#![forbid(unsafe_code)]`. pub allow_internal_unsafe: bool,