about summary refs log tree commit diff
path: root/src/libsyntax/tokenstream.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-30 09:19:21 +0000
committerbors <bors@rust-lang.org>2018-06-30 09:19:21 +0000
commitbfc1ee4968ff5778cd80e12150f379ddfe6c2767 (patch)
tree1e61b5ce7879de8613a142ffd6c029f8866bf70a /src/libsyntax/tokenstream.rs
parentacf50b79beb5909c16861cc7c91e8226b7f78272 (diff)
parent84f1bc8b662da4ceb0e448bf0d24ce627e6a462b (diff)
downloadrust-bfc1ee4968ff5778cd80e12150f379ddfe6c2767.tar.gz
rust-bfc1ee4968ff5778cd80e12150f379ddfe6c2767.zip
Auto merge of #51762 - petrochenkov:oh-hi-mark, r=oli-obk
hygiene: Implement transparent marks and use them for call-site hygiene in proc-macros

Fixes https://github.com/rust-lang/rust/issues/50050
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
-rw-r--r--src/libsyntax/tokenstream.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs
index 455cc4391dd..8736fcf9729 100644
--- a/src/libsyntax/tokenstream.rs
+++ b/src/libsyntax/tokenstream.rs
@@ -57,8 +57,8 @@ impl Delimited {
 
     /// Returns the opening delimiter as a token tree.
     pub fn open_tt(&self, span: Span) -> TokenTree {
-        let open_span = if span == DUMMY_SP {
-            DUMMY_SP
+        let open_span = if span.is_dummy() {
+            span
         } else {
             span.with_hi(span.lo() + BytePos(self.delim.len() as u32))
         };
@@ -67,8 +67,8 @@ impl Delimited {
 
     /// Returns the closing delimiter as a token tree.
     pub fn close_tt(&self, span: Span) -> TokenTree {
-        let close_span = if span == DUMMY_SP {
-            DUMMY_SP
+        let close_span = if span.is_dummy() {
+            span
         } else {
             span.with_lo(span.hi() - BytePos(self.delim.len() as u32))
         };