]> git.lizzy.rs Git - rust.git/commitdiff
Cargo fmt and update tests
authorSeiichi Uchida <seuchida@gmail.com>
Sat, 2 Dec 2017 08:45:39 +0000 (17:45 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Sat, 2 Dec 2017 08:45:39 +0000 (17:45 +0900)
20 files changed:
build.rs
src/bin/git-fmt.rs
src/bin/rustfmt.rs
src/comment.rs
src/config.rs
src/imports.rs
src/items.rs
src/modules.rs
tests/target/control-brace-style-always-next-line.rs
tests/target/control-brace-style-always-same-line.rs
tests/target/else-if-brace-style-always-next-line.rs
tests/target/else-if-brace-style-always-same-line.rs
tests/target/else-if-brace-style-closing-next-line.rs
tests/target/empty-tuple-no-conversion-to-unit-struct.rs
tests/target/enum.rs
tests/target/fn-simple.rs
tests/target/fn.rs
tests/target/impls.rs
tests/target/multiple.rs
tests/target/type_alias.rs

index 42d9330f75d8507194c995b90de0aaa7d7d17515..2643946236d6c2a52a5172046806a7851ff9ab3c 100644 (file)
--- a/build.rs
+++ b/build.rs
@@ -14,7 +14,6 @@
 use std::path::PathBuf;
 use std::process::Command;
 
-
 fn main() {
     let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
 
index 9bfeff8420e90a07345b3054ab5889fb13d3882d..5e7cb458649b3b3d7328522764a8dc9166d5ac2b 100644 (file)
@@ -14,7 +14,6 @@
 use rustfmt::{run, Input};
 use rustfmt::config;
 
-
 fn prune_files(files: Vec<&str>) -> Vec<&str> {
     let prefixes: Vec<_> = files
         .iter()
index 001f2c8e0f70c1f0d0423ac3b57932fac8019c2d..9bf268878817932bde55ec2662078581d7ae40af 100644 (file)
@@ -10,7 +10,6 @@
 
 #![cfg(not(test))]
 
-
 extern crate env_logger;
 extern crate getopts;
 extern crate rustfmt_nightly as rustfmt;
index 2e3dadd20660b9d1e68d893fafd719cfead730e2..4b16199d82691fa64b05f0b9736a7642f50e6ab8 100644 (file)
@@ -824,9 +824,6 @@ fn next(&mut self) -> Option<Self::Item> {
     }
 }
 
-
-
-
 /// Iterator over an alternating sequence of functional and commented parts of
 /// a string. The first item is always a, possibly zero length, subslice of
 /// functional text. Line style comments contain their ending newlines.
@@ -948,7 +945,6 @@ fn changed_comment_content(orig: &str, new: &str) -> bool {
     res
 }
 
-
 /// Iterator over the 'payload' characters of a comment.
 /// It skips whitespace, comment start/end marks, and '*' at the beginning of lines.
 /// The comment must be one comment, ie not more than one start mark (no multiple line comments,
@@ -994,7 +990,6 @@ fn next(&mut self) -> Option<Self::Item> {
     }
 }
 
-
 fn remove_comment_header(comment: &str) -> &str {
     if comment.starts_with("///") || comment.starts_with("//!") {
         &comment[3..]
index 0c7d5c02c01902f57b7cfe5ab13c966c0ed3ea5e..4172710a0892040f2bca8eeb889e45d63073d28d 100644 (file)
@@ -21,7 +21,6 @@
 use lists::{ListTactic, SeparatorPlace, SeparatorTactic};
 use Summary;
 
-
 macro_rules! is_nightly_channel {
     () => {
     env::var("CFG_RELEASE_CHANNEL")
@@ -88,7 +87,6 @@ pub enum $e {
     Wide,
 }
 
-
 impl Density {
     pub fn to_list_tactic(self) -> ListTactic {
         match self {
@@ -579,8 +577,6 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
     Ok(None)
 }
 
-
-
 create_config! {
     // Fundamental stuff
     max_width: usize, 100, true, "Maximum width of each line";
index 24ca36851a1047977e7a61ef0fe8c68a17c00ef6..f38e41eca8942ae3ceba5f1c814d4ea2e78afaa2 100644 (file)
@@ -13,7 +13,6 @@
 use syntax::ast;
 use syntax::codemap::{BytePos, Span};
 
-
 use spanned::Spanned;
 use codemap::SpanUtils;
 use comment::combine_strs_with_missing_comments;
index ce0439b127b32cfd9a34243084c6461faa7914ae..2fc3405735573ee4facdd223af3a9d12e3acc587 100644 (file)
@@ -285,7 +285,6 @@ pub fn format_foreign_mod(&mut self, fm: &ast::ForeignMod, span: Span) {
         self.format_item(item);
     }
 
-
     fn format_foreign_item(&mut self, item: &ast::ForeignItem) {
         let rewrite = item.rewrite(&self.get_context(), self.shape());
         self.push_rewrite(item.span(), rewrite);
index d136f2709914a969f7a7c79ce324909869a59ccf..30deafd3f9e99d584ac987f0c22136a5c15546ad 100644 (file)
@@ -18,7 +18,6 @@
 
 use utils::contains_skip;
 
-
 /// List all the files containing modules of a crate.
 /// If a file is used twice in a crate, it appears only once.
 pub fn list_files<'a>(
index 5b368fd08dbdfe2efbd747052e39edb09c207355..054a3075ca0c5aa675d7b0336ac632a1d1135920 100644 (file)
@@ -7,28 +7,24 @@ fn main() {
         ();
     }
 
-
     'label: loop
     // loop comment
     {
         ();
     }
 
-
     cond = true;
     while cond
     {
         ();
     }
 
-
     'while_label: while cond
     {
         // while comment
         ();
     }
 
-
     for obj in iter
     {
         for sub_obj in obj
index 46b74b95d825d9c42bf2a069e3050ed4cd359bf9..ae6bf4a56821c768fb4a54a03a9363b224b9a029 100644 (file)
@@ -6,26 +6,22 @@ fn main() {
         ();
     }
 
-
     'label: loop
     // loop comment
     {
         ();
     }
 
-
     cond = true;
     while cond {
         ();
     }
 
-
     'while_label: while cond {
         // while comment
         ();
     }
 
-
     for obj in iter {
         for sub_obj in obj {
             'nested_while_label: while cond {
index c180ff697fcb23041ed5215727a90e2198e27a58..31e12cfa0d02e94eaa3ca8f1732b05c8a706c54a 100644 (file)
@@ -14,10 +14,8 @@ fn main() {
         ();
     }
 
-
     let a = if 0 > 1 { unreachable!() } else { 0x0 };
 
-
     if true
     {
         ();
index 4c6153d5f1f509091a792a00dc2abf66bdccddcc..5e5ab21a0d884ae7b701e793a9c1b3b0e772313b 100644 (file)
@@ -13,10 +13,8 @@ fn main() {
         ();
     }
 
-
     let a = if 0 > 1 { unreachable!() } else { 0x0 };
 
-
     if true {
         ();
     } else if false {
index 04ee82bb82840c2c241f22fca7795f8ef9f7a8ef..c99807dc06db460f8a447a4f85c798d3506e4d1b 100644 (file)
@@ -13,10 +13,8 @@ fn main() {
         ();
     }
 
-
     let a = if 0 > 1 { unreachable!() } else { 0x0 };
 
-
     if true {
         ();
     }
index 778937b0d56ca5819cf6536be48cabe95f02cc8f..0b9a15e8a9261601edbc4e54e0ec9ca6782b8e23 100644 (file)
@@ -3,7 +3,6 @@ enum TestEnum {
     Arm2,
 }
 
-
 fn foo() {
     let test = TestEnum::Arm1;
     match test {
index 78b0fd1b69d03e92403423073cbe825d41bfd120..779c8b168a3a8299986d691d07f77508d5fec286 100644 (file)
@@ -95,7 +95,6 @@ pub enum GenericEnum<I, T>
     Right { list: I, root: T }, // Post Comment
 }
 
-
 enum EmtpyWithComment {
     // Some comment
 }
index 3b5e884d4a4d93fa4f0d13fb0adbe6d46970c317..4e6e649383559a02f2defadeb0002ffe8f3b4459 100644 (file)
@@ -18,7 +18,6 @@ fn op(
     "cool"
 }
 
-
 fn weird_comment(
     // /*/ double level */ comment
     x: Hello, // /*/* triple, even */*/
index 8b581e835394e0fa167332deb0bf5fd25b344e77..b78a8b5b21ed539ec543eccfb5399f1c1183f8bd 100644 (file)
@@ -24,7 +24,6 @@ fn foo(
 
 }
 
-
 fn foo<U, T>(
     a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
     b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
index e0070adcad4d87b86e4e62b7deef3aef93ad2e9b..a743d7f3067df40ddb183c67bd02faa1f7594d4e 100644 (file)
@@ -78,7 +78,6 @@ fn foo() {}
     }
 }
 
-
 mod b {
     mod a {
         impl Foo {
index 6e61c82e5f61ccdc934c9eac77b04b2d8f04641e..b766eb72f68cf57282f617ca1f00c31ec350c453 100644 (file)
@@ -129,7 +129,6 @@ fn main() {
         println!("{}", i);
     }
 
-
     while true {
         hello();
     }
index 5aef092934e1b336bde15ad74777df20098d77e3..8833be9e1a0f0a9af925271a3e76ed5318af60d1 100644 (file)
@@ -52,7 +52,6 @@
     T,
 > = ();
 
-
 pub type WithWhereClause<LONGPARAMETERNAME, T>
 where
     T: Clone,