about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-03-18 23:51:53 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-04-06 11:48:19 +0300
commit43ad9723181d30dcf7531b0fb0fb975d6590f4c0 (patch)
treed9fa54227df16b20fcdab9adca3d7ee42211d05f /src/libsyntax/ext/tt
parente2afefd80bf779bc3c6f697a3c6cc3a476993602 (diff)
downloadrust-43ad9723181d30dcf7531b0fb0fb975d6590f4c0.tar.gz
rust-43ad9723181d30dcf7531b0fb0fb975d6590f4c0.zip
Use `Span::apply_mark` where possible
Diffstat (limited to 'src/libsyntax/ext/tt')
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 12ada3bdbc0..1cdb6b0e5c9 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -156,7 +156,7 @@ pub fn transcribe(cx: &ExtCtxt,
                         if let NtTT(ref tt) = **nt {
                             result.push(tt.clone().into());
                         } else {
-                            sp = sp.with_ctxt(sp.ctxt().apply_mark(cx.current_expansion.mark));
+                            sp = sp.apply_mark(cx.current_expansion.mark);
                             let token = TokenTree::Token(sp, Token::interpolated((**nt).clone()));
                             result.push(token.into());
                         }
@@ -167,13 +167,13 @@ pub fn transcribe(cx: &ExtCtxt,
                 } else {
                     let ident =
                         Ident::new(ident.name, ident.span.apply_mark(cx.current_expansion.mark));
-                    sp = sp.with_ctxt(sp.ctxt().apply_mark(cx.current_expansion.mark));
+                    sp = sp.apply_mark(cx.current_expansion.mark);
                     result.push(TokenTree::Token(sp, token::Dollar).into());
                     result.push(TokenTree::Token(sp, token::Token::from_ast_ident(ident)).into());
                 }
             }
             quoted::TokenTree::Delimited(mut span, delimited) => {
-                span = span.with_ctxt(span.ctxt().apply_mark(cx.current_expansion.mark));
+                span = span.apply_mark(cx.current_expansion.mark);
                 stack.push(Frame::Delimited { forest: delimited, idx: 0, span: span });
                 result_stack.push(mem::replace(&mut result, Vec::new()));
             }