]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/manual_strip.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / manual_strip.rs
index cbb84eb5c7e3709411156d5c5483cdf1020fe567..85009d78558ba7d68abd82b3b76680fad600adf7 100644 (file)
@@ -1,3 +1,4 @@
+#![feature(custom_inner_attributes)]
 #![warn(clippy::manual_strip)]
 
 fn main() {
@@ -64,3 +65,21 @@ fn main() {
         s4[2..].to_string();
     }
 }
+
+fn msrv_1_44() {
+    #![clippy::msrv = "1.44"]
+
+    let s = "abc";
+    if s.starts_with('a') {
+        s[1..].to_string();
+    }
+}
+
+fn msrv_1_45() {
+    #![clippy::msrv = "1.45"]
+
+    let s = "abc";
+    if s.starts_with('a') {
+        s[1..].to_string();
+    }
+}