1
Fork 0

syntax_pos: NO_EXPANSION/SyntaxContext::empty() -> SyntaxContext::root()

For consistency with `ExpnId::root`.

Also introduce a helper `Span::with_root_ctxt` for creating spans with `SyntaxContext::root()` context
This commit is contained in:
Vadim Petrochenkov 2019-08-11 01:44:55 +03:00
parent dfcbe75900
commit 67d6ce4206
20 changed files with 53 additions and 53 deletions

View file

@ -365,7 +365,7 @@ impl<'a> Rustc<'a> {
let location = cx.current_expansion.id.expn_info().unwrap().call_site;
let to_span = |transparency| {
location.with_ctxt(
SyntaxContext::empty()
SyntaxContext::root()
.apply_mark_with_transparency(cx.current_expansion.id, transparency),
)
};