about summary refs log tree commit diff
path: root/src/libsyntax/errors/snippet
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-04-26 13:06:28 -0400
committerNiko Matsakis <niko@alum.mit.edu>2016-05-02 11:49:24 -0400
commitf6496cd3700a9a4e3dc1a6d3245287066f4b99e4 (patch)
tree8ab515fce8236447b7c75607eb150d0d91225879 /src/libsyntax/errors/snippet
parentd5529f000da43fe2e9f2aad03f747b0144da9354 (diff)
downloadrust-f6496cd3700a9a4e3dc1a6d3245287066f4b99e4.tar.gz
rust-f6496cd3700a9a4e3dc1a6d3245287066f4b99e4.zip
Nit: address various style nits
Diffstat (limited to 'src/libsyntax/errors/snippet')
-rw-r--r--src/libsyntax/errors/snippet/mod.rs4
-rw-r--r--src/libsyntax/errors/snippet/test.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/errors/snippet/mod.rs b/src/libsyntax/errors/snippet/mod.rs
index 4d9a3eb2486..ada336b29a4 100644
--- a/src/libsyntax/errors/snippet/mod.rs
+++ b/src/libsyntax/errors/snippet/mod.rs
@@ -16,7 +16,6 @@ use std::rc::Rc;
 use std::mem;
 use std::ops::Range;
 
-#[cfg(test)]
 mod test;
 
 pub struct SnippetData {
@@ -210,8 +209,7 @@ impl<S> From<(S, Style, RenderedLineKind)> for RenderedLine
 impl<S1,S2> From<(S1, Style, S2, Style, RenderedLineKind)> for RenderedLine
     where S1: StringSource, S2: StringSource
 {
-    fn from(tuple: (S1, Style, S2, Style, RenderedLineKind))
-            -> Self {
+    fn from(tuple: (S1, Style, S2, Style, RenderedLineKind)) -> Self {
         let (text1, style1, text2, style2, kind) = tuple;
         RenderedLine {
             text: vec![
diff --git a/src/libsyntax/errors/snippet/test.rs b/src/libsyntax/errors/snippet/test.rs
index 44ece285b1b..ccf50536adb 100644
--- a/src/libsyntax/errors/snippet/test.rs
+++ b/src/libsyntax/errors/snippet/test.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -10,6 +10,8 @@
 
 // Code for testing annotated snippets.
 
+#![cfg(test)]
+
 use codemap::{BytePos, CodeMap, FileMap, NO_EXPANSION, Span};
 use std::rc::Rc;
 use super::{RenderedLine, SnippetData};