]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/non_expressive_names.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / non_expressive_names.rs
index 47e4da61b51e794691b0457838ddcebbdc454e21..86c9edc821d7edfc22ece6aea004be93212f8587 100644 (file)
@@ -7,13 +7,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-#![feature(tool_lints)]
-
-#![warn(clippy::all,clippy::similar_names)]
+#![warn(clippy::all, clippy::similar_names)]
 #![allow(unused, clippy::println_empty_string)]
 
-
 struct Foo {
     apple: i32,
     bpple: i32,
@@ -29,7 +25,6 @@ fn main() {
 
     let cpple: i32;
 
-
     let a_bar: i32;
     let b_bar: i32;
     let c_bar: i32;
@@ -54,7 +49,6 @@ fn main() {
     let blubx: i32;
     let bluby: i32;
 
-
     let cake: i32;
     let cakes: i32;
     let coke: i32;
@@ -81,7 +75,6 @@ fn main() {
     let parsed: i32;
     let parsee: i32;
 
-
     let setter: i32;
     let getter: i32;
     let tx1: i32;
@@ -92,8 +85,10 @@ fn main() {
 
 fn foo() {
     let Foo { apple, bpple } = unimplemented!();
-    let Foo { apple: spring,
-        bpple: sprang } = unimplemented!();
+    let Foo {
+        apple: spring,
+        bpple: sprang,
+    } = unimplemented!();
 }
 
 #[derive(Clone, Debug)]
@@ -132,7 +127,6 @@ fn bla() {
         {
             let e: i32;
             let f: i32;
-
         }
         match 5 {
             1 => println!(""),
@@ -149,18 +143,18 @@ fn underscores_and_numbers() {
     let _1 = 1; //~ERROR Consider a more descriptive name
     let ____1 = 1; //~ERROR Consider a more descriptive name
     let __1___2 = 12; //~ERROR Consider a more descriptive name
-    let _1_ok= 1;
+    let _1_ok = 1;
 }
 
 fn issue2927() {
-  let args = 1;
-  format!("{:?}", 2);
+    let args = 1;
+    format!("{:?}", 2);
 }
 
 fn issue3078() {
     match "a" {
         stringify!(a) => {},
-        _ => {}
+        _ => {},
     }
 }
 
@@ -171,7 +165,7 @@ fn bar() {
         let _1 = 1;
         let ____1 = 1;
         let __1___2 = 12;
-        let _1_ok= 1;
+        let _1_ok = 1;
     }
 }