use serialize::{Encodable, Decodable, Encoder, Decoder};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
+use rustc_data_structures::sync::Lrc;
use std::{fmt, mem};
/// A SyntaxContext represents a chain of macro expansions (represented by marks).
dollar_crate_name: Symbol,
}
-/// A mark is a unique id associated with a macro expansion.
+/// A mark is a unique ID associated with a macro expansion.
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)]
pub struct Mark(u32);
pub def_site: Option<Span>,
/// The format with which the macro was invoked.
pub format: ExpnFormat,
- /// Whether the macro is allowed to use #[unstable]/feature-gated
- /// features internally without forcing the whole crate to opt-in
+ /// 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: bool,
+ 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,
QuestionMark,
TryBlock,
/// Desugaring of an `impl Trait` in return type position
- /// to an `existential type Foo: Trait;` + replacing the
+ /// to an `existential type Foo: Trait;` and replacing the
/// `impl Trait` with `Foo`.
ExistentialReturnType,
Async,