about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libsyntax/ext/tt/macro_rules.rs2
-rw-r--r--src/libsyntax/ext/tt/quoted.rs2
-rw-r--r--src/test/ui/macros/macro-follow.stderr44
3 files changed, 24 insertions, 24 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index 81c5ef135b2..ce695df7775 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -751,7 +751,7 @@ impl TokenSet {
 }
 
 // Checks that `matcher` is internally consistent and that it
-// can legally by followed by a token N, for all N in `follow`.
+// can legally be followed by a token `N`, for all `N` in `follow`.
 // (If `follow` is empty, then it imposes no constraint on
 // the `matcher`.)
 //
diff --git a/src/libsyntax/ext/tt/quoted.rs b/src/libsyntax/ext/tt/quoted.rs
index f67e4d368cc..cad94a0e4c1 100644
--- a/src/libsyntax/ext/tt/quoted.rs
+++ b/src/libsyntax/ext/tt/quoted.rs
@@ -27,7 +27,7 @@ impl Delimited {
         let open_span = if span.is_dummy() {
             span
         } else {
-            span.with_lo(span.lo() + BytePos(self.delim.len() as u32))
+            span.with_hi(span.lo() + BytePos(self.delim.len() as u32))
         };
         TokenTree::token(token::OpenDelim(self.delim), open_span)
     }
diff --git a/src/test/ui/macros/macro-follow.stderr b/src/test/ui/macros/macro-follow.stderr
index d3f081bb4a2..61ae79d235e 100644
--- a/src/test/ui/macros/macro-follow.stderr
+++ b/src/test/ui/macros/macro-follow.stderr
@@ -1,24 +1,24 @@
 error: `$p:pat` is followed by `(`, which is not allowed for `pat` fragments
-  --> $DIR/macro-follow.rs:8:14
+  --> $DIR/macro-follow.rs:8:13
    |
 LL |     ($p:pat ()) => {};
-   |              ^ not allowed after `pat` fragments
+   |             ^ not allowed after `pat` fragments
    |
    = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
 
 error: `$p:pat` is followed by `[`, which is not allowed for `pat` fragments
-  --> $DIR/macro-follow.rs:9:14
+  --> $DIR/macro-follow.rs:9:13
    |
 LL |     ($p:pat []) => {};
-   |              ^ not allowed after `pat` fragments
+   |             ^ not allowed after `pat` fragments
    |
    = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
 
 error: `$p:pat` is followed by `{`, which is not allowed for `pat` fragments
-  --> $DIR/macro-follow.rs:10:14
+  --> $DIR/macro-follow.rs:10:13
    |
 LL |     ($p:pat {}) => {};
-   |              ^ not allowed after `pat` fragments
+   |             ^ not allowed after `pat` fragments
    |
    = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
 
@@ -135,26 +135,26 @@ LL |     ($p:pat $m:meta) => {};
    = note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
 
 error: `$e:expr` is followed by `(`, which is not allowed for `expr` fragments
-  --> $DIR/macro-follow.rs:28:15
+  --> $DIR/macro-follow.rs:28:14
    |
 LL |     ($e:expr ()) => {};
-   |               ^ not allowed after `expr` fragments
+   |              ^ not allowed after `expr` fragments
    |
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$e:expr` is followed by `[`, which is not allowed for `expr` fragments
-  --> $DIR/macro-follow.rs:29:15
+  --> $DIR/macro-follow.rs:29:14
    |
 LL |     ($e:expr []) => {};
-   |               ^ not allowed after `expr` fragments
+   |              ^ not allowed after `expr` fragments
    |
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$e:expr` is followed by `{`, which is not allowed for `expr` fragments
-  --> $DIR/macro-follow.rs:30:15
+  --> $DIR/macro-follow.rs:30:14
    |
 LL |     ($e:expr {}) => {};
-   |               ^ not allowed after `expr` fragments
+   |              ^ not allowed after `expr` fragments
    |
    = note: allowed there are: `=>`, `,` or `;`
 
@@ -303,10 +303,10 @@ LL |     ($e:expr $m:meta) => {};
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$t:ty` is followed by `(`, which is not allowed for `ty` fragments
-  --> $DIR/macro-follow.rs:53:13
+  --> $DIR/macro-follow.rs:53:12
    |
 LL |     ($t:ty ()) => {};
-   |             ^ not allowed after `ty` fragments
+   |            ^ not allowed after `ty` fragments
    |
    = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
 
@@ -407,26 +407,26 @@ LL |     ($t:ty $m:meta) => {};
    = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
 
 error: `$s:stmt` is followed by `(`, which is not allowed for `stmt` fragments
-  --> $DIR/macro-follow.rs:71:15
+  --> $DIR/macro-follow.rs:71:14
    |
 LL |     ($s:stmt ()) => {};
-   |               ^ not allowed after `stmt` fragments
+   |              ^ not allowed after `stmt` fragments
    |
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$s:stmt` is followed by `[`, which is not allowed for `stmt` fragments
-  --> $DIR/macro-follow.rs:72:15
+  --> $DIR/macro-follow.rs:72:14
    |
 LL |     ($s:stmt []) => {};
-   |               ^ not allowed after `stmt` fragments
+   |              ^ not allowed after `stmt` fragments
    |
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$s:stmt` is followed by `{`, which is not allowed for `stmt` fragments
-  --> $DIR/macro-follow.rs:73:15
+  --> $DIR/macro-follow.rs:73:14
    |
 LL |     ($s:stmt {}) => {};
-   |               ^ not allowed after `stmt` fragments
+   |              ^ not allowed after `stmt` fragments
    |
    = note: allowed there are: `=>`, `,` or `;`
 
@@ -575,10 +575,10 @@ LL |     ($s:stmt $m:meta) => {};
    = note: allowed there are: `=>`, `,` or `;`
 
 error: `$p:path` is followed by `(`, which is not allowed for `path` fragments
-  --> $DIR/macro-follow.rs:95:15
+  --> $DIR/macro-follow.rs:95:14
    |
 LL |     ($p:path ()) => {};
-   |               ^ not allowed after `path` fragments
+   |              ^ not allowed after `path` fragments
    |
    = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`