Make ExpnData
fields krate
and orig_id
private
These fields are only used by hygiene serialized, and should not be accessed by anything outside of `rustc_span`.
This commit is contained in:
parent
18cb4ad3b9
commit
21b8f2ecde
5 changed files with 63 additions and 27 deletions
|
@ -57,7 +57,7 @@ use rustc_session::lint::{builtin::BARE_TRAIT_OBJECTS, BuiltinLintDiagnostics, L
|
|||
use rustc_session::parse::ParseSess;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::hygiene::ExpnId;
|
||||
use rustc_span::source_map::{respan, DesugaringKind, ExpnData, ExpnKind};
|
||||
use rustc_span::source_map::{respan, DesugaringKind};
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
||||
|
@ -743,10 +743,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
span: Span,
|
||||
allow_internal_unstable: Option<Lrc<[Symbol]>>,
|
||||
) -> Span {
|
||||
span.fresh_expansion(ExpnData {
|
||||
allow_internal_unstable,
|
||||
..ExpnData::default(ExpnKind::Desugaring(reason), span, self.sess.edition(), None)
|
||||
})
|
||||
span.mark_with_reason(allow_internal_unstable, reason, self.sess.edition())
|
||||
}
|
||||
|
||||
fn with_anonymous_lifetime_mode<R>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue