about summary refs log tree commit diff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorSeiichi Uchida <seuchida@gmail.com>2018-02-05 09:56:26 +0900
committerGitHub <noreply@github.com>2018-02-05 09:56:26 +0900
commitd85e1db1785a7ec60597b125faa248d0fa0b9d49 (patch)
tree4b06ef7da6f60a209a2faa9589c0e80cc776ac2b /src/utils.rs
parent18ba02ea70b9d6e9fba5306c6b7f2cd84df5d452 (diff)
parent8691c64e9970043f13ed3d5a6f1ac62ced7159f3 (diff)
Merge pull request #2393 from RReverser/macro_rules
Format stable macro_rules
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 2f65d273246..443dc6c7a05 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -342,9 +342,9 @@ macro_rules! msg {
 // For format_missing and last_pos, need to use the source callsite (if applicable).
 // Required as generated code spans aren't guaranteed to follow on from the last span.
 macro_rules! source {
-    ($this:ident, $sp: expr) => {
+    ($this: ident, $sp: expr) => {
         $sp.source_callsite()
-    }
+    };
 }
 
 pub fn mk_sp(lo: BytePos, hi: BytePos) -> Span {
@@ -353,28 +353,29 @@ pub fn mk_sp(lo: BytePos, hi: BytePos) -> Span {
 
 // Return true if the given span does not intersect with file lines.
 macro_rules! out_of_file_lines_range {
-    ($self:ident, $span:expr) => {
-        !$self.config
+    ($self: ident, $span: expr) => {
+        !$self
+            .config
             .file_lines()
             .intersects(&$self.codemap.lookup_line_range($span))
-    }
+    };
 }
 
 macro_rules! skip_out_of_file_lines_range {
-    ($self:ident, $span:expr) => {
+    ($self: ident, $span: expr) => {
         if out_of_file_lines_range!($self, $span) {
             return None;
         }
-    }
+    };
 }
 
 macro_rules! skip_out_of_file_lines_range_visitor {
-    ($self:ident, $span:expr) => {
+    ($self: ident, $span: expr) => {
         if out_of_file_lines_range!($self, $span) {
             $self.push_rewrite($span, None);
             return;
         }
-    }
+    };
 }
 
 // Wraps String in an Option. Returns Some when the string adheres to the