]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/from_over_into.fixed
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / from_over_into.fixed
index e66dc43b0473edcb17a13b2120552039b48675ef..1cf49ca45f494d1eca6d0a02785ca04781747755 100644 (file)
@@ -1,5 +1,6 @@
 // run-rustfix
 
+#![feature(custom_inner_attributes)]
 #![warn(clippy::from_over_into)]
 #![allow(unused)]
 
@@ -59,4 +60,28 @@ impl From<String> for 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> From<Vec<T>> for FromOverInto<T> {
+        fn from(val: Vec<T>) -> Self {
+            FromOverInto(val)
+        }
+    }
+}
+
 fn main() {}