1
Fork 0

syntax/rustc: move mark_span_with_reason back.

This commit is contained in:
David Wood 2019-05-31 15:50:06 +01:00
parent d0c78dd7aa
commit 32771071e8
No known key found for this signature in database
GPG key ID: 01760B4F9F53F154
2 changed files with 35 additions and 37 deletions

View file

@ -935,27 +935,6 @@ impl SourceMap {
None
}
/// Reuses the span but adds information like the kind of the desugaring and features that are
/// allowed inside this span.
pub fn mark_span_with_reason(
&self,
reason: hygiene::CompilerDesugaringKind,
span: Span,
allow_internal_unstable: Option<Lrc<[symbol::Symbol]>>,
) -> Span {
let mark = Mark::fresh(Mark::root());
mark.set_expn_info(ExpnInfo {
call_site: span,
def_site: Some(span),
format: CompilerDesugaring(reason),
allow_internal_unstable,
allow_internal_unsafe: false,
local_inner_macros: false,
edition: edition::Edition::from_session(),
});
span.with_ctxt(SyntaxContext::empty().apply_mark(mark))
}
}
impl SourceMapper for SourceMap {