]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/from_over_into.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / from_over_into.rs
index 74c7be6af79e1a5f8df29ca037a8b026406f1a9d..d30f3c3fc92567ba78b18523e3b6aa2b891d5de8 100644 (file)
@@ -1,5 +1,6 @@
 // run-rustfix
 
+#![feature(custom_inner_attributes)]
 #![warn(clippy::from_over_into)]
 #![allow(unused)]
 
@@ -59,4 +60,28 @@ fn from(s: String) -> A {
     }
 }
 
+fn msrv_1_40() {
+    #![clippy::msrv = "1.40"]
+
+    struct FromOverInto<T>(Vec<T>);
+
+    impl<T> Into<FromOverInto<T>> for Vec<T> {
+        fn into(self) -> FromOverInto<T> {
+            FromOverInto(self)
+        }
+    }
+}
+
+fn msrv_1_41() {
+    #![clippy::msrv = "1.41"]
+
+    struct FromOverInto<T>(Vec<T>);
+
+    impl<T> Into<FromOverInto<T>> for Vec<T> {
+        fn into(self) -> FromOverInto<T> {
+            FromOverInto(self)
+        }
+    }
+}
+
 fn main() {}