]> git.lizzy.rs Git - rust.git/commitdiff
Cargo fmt and update tests
authortopecongiro <seuchida@gmail.com>
Tue, 19 Sep 2017 02:41:50 +0000 (11:41 +0900)
committertopecongiro <seuchida@gmail.com>
Tue, 19 Sep 2017 02:41:50 +0000 (11:41 +0900)
src/file_lines.rs
tests/source/configs-fn_call_style-block-trailing-comma.rs
tests/target/configs-fn_call_style-block-trailing-comma.rs
tests/target/enum.rs
tests/target/expr-block.rs
tests/target/string-lit.rs

index 948ffac073157cac8bbce8bcf4b4e5cd0d8cb422..a131038eb4e1d7dea9db5f8f4296460479576d6b 100644 (file)
@@ -167,9 +167,7 @@ pub fn intersects_range(&self, file_name: &str, lo: usize, hi: usize) -> bool {
 }
 
 /// `FileLines` files iterator.
-pub struct Files<'a>(
-    Option<::std::collections::hash_map::Keys<'a, String, Vec<Range>>>,
-);
+pub struct Files<'a>(Option<::std::collections::hash_map::Keys<'a, String, Vec<Range>>>);
 
 impl<'a> iter::Iterator for Files<'a> {
     type Item = &'a String;
index 6f613fb10bb4a656394ef920c3ddb5475d066bde..ad813f6b98ae5ae3baf661f6a8b2779a7a92785c 100644 (file)
@@ -4,5 +4,5 @@
 // rustfmt should not add trailing comma when rewriting macro. See #1528.
 fn a() {
     panic!("this is a long string that goes past the maximum line length causing rustfmt to insert a comma here:");
-    foo(oooptoptoptoptptooptoptoptoptptooptoptoptoptptoptoptoptoptpt());
+    foo(a, oooptoptoptoptptooptoptoptoptptooptoptoptoptptoptoptoptoptpt());
 }
index b6eb94eb67766ec5448353f94ffebf5083f210fb..4405f89f2afe64a74eab41129a7926aef887e4ba 100644 (file)
@@ -7,6 +7,7 @@ fn a() {
         "this is a long string that goes past the maximum line length causing rustfmt to insert a comma here:"
     );
     foo(
+        a,
         oooptoptoptoptptooptoptoptoptptooptoptoptoptptoptoptoptoptpt(),
     );
 }
index 393ae5232ec0a41665f420a17004420e6a582e42..d2a39b241e1f6d816f3f030cf3879bf7a181bcdc 100644 (file)
@@ -170,10 +170,6 @@ enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 
 // #1046
 pub enum Entry<'a, K: 'a, V: 'a> {
-    Vacant(
-        #[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>,
-    ),
-    Occupied(
-        #[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>,
-    ),
+    Vacant(#[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>),
+    Occupied(#[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>),
 }
index 6141ca8120e1f73d3c002cced1c65f1a2b231626..329890e8b12f6350912a64bdfc45b7c1627b423e 100644 (file)
@@ -307,9 +307,7 @@ fn combine_block() {
     };
 
     match x {
-        y => func(
-            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
-        ),
+        y => func(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx),
         _ => func(
             x,
             yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
index fc92d379a52ec3e4bcaac2e3a9b723ca88adc44e..e262d69b43e6c4ad5cda05abcfe92adc09cb3c1c 100644 (file)
@@ -25,9 +25,8 @@ fn main() -> &'static str {
 
     filename.replace(" ", "\\");
 
-    let xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = funktion(
-        "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
-    );
+    let xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =
+        funktion("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy");
 
     let unicode = "a̐éö̲\r\n";
     let unicode2 = "Löwe 老虎 Léopard";