]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/starts_ends_with.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / starts_ends_with.rs
index 180924d2c9cff869f00ac47a252732e061076969..529c2487f542b8f265bc32255c1418a38aabcf82 100644 (file)
@@ -7,9 +7,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-#![feature(tool_lints)]
-
 #![allow(dead_code)]
 
 fn main() {}
@@ -22,22 +19,28 @@ fn starts_with() {
 
 fn chars_cmp_with_unwrap() {
     let s = String::from("foo");
-    if s.chars().next().unwrap() == 'f' { // s.starts_with('f')
+    if s.chars().next().unwrap() == 'f' {
+        // s.starts_with('f')
         // Nothing here
     }
-    if s.chars().next_back().unwrap() == 'o' { // s.ends_with('o')
+    if s.chars().next_back().unwrap() == 'o' {
+        // s.ends_with('o')
         // Nothing here
     }
-    if s.chars().last().unwrap() == 'o' { // s.ends_with('o')
+    if s.chars().last().unwrap() == 'o' {
+        // s.ends_with('o')
         // Nothing here
     }
-    if s.chars().next().unwrap() != 'f' { // !s.starts_with('f')
+    if s.chars().next().unwrap() != 'f' {
+        // !s.starts_with('f')
         // Nothing here
     }
-    if s.chars().next_back().unwrap() != 'o' { // !s.ends_with('o')
+    if s.chars().next_back().unwrap() != 'o' {
+        // !s.ends_with('o')
         // Nothing here
     }
-    if s.chars().last().unwrap() != 'o' { // !s.ends_with('o')
+    if s.chars().last().unwrap() != 'o' {
+        // !s.ends_with('o')
         // Nothing here
     }
 }