]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/err_expect.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / err_expect.rs
index bf8c3c9fb8c98f680adfaeb6a9e9f2fa30fc437a..6e7c47d9ad3cf09f49736c3a092577a5d2aed96e 100644 (file)
@@ -1,5 +1,8 @@
 // run-rustfix
 
+#![feature(custom_inner_attributes)]
+#![allow(unused)]
+
 struct MyTypeNonDebug;
 
 #[derive(Debug)]
@@ -12,3 +15,17 @@ fn main() {
     let test_non_debug: Result<MyTypeNonDebug, u32> = Ok(MyTypeNonDebug);
     test_non_debug.err().expect("Testing non debug type");
 }
+
+fn msrv_1_16() {
+    #![clippy::msrv = "1.16"]
+
+    let x: Result<u32, &str> = Ok(16);
+    x.err().expect("16");
+}
+
+fn msrv_1_17() {
+    #![clippy::msrv = "1.17"]
+
+    let x: Result<u32, &str> = Ok(17);
+    x.err().expect("17");
+}