summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/err_expect.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/err_expect.fixed')
-rw-r--r--src/tools/clippy/tests/ui/err_expect.fixed17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/err_expect.fixed b/src/tools/clippy/tests/ui/err_expect.fixed
index 7e18d70ba..3bac738ac 100644
--- a/src/tools/clippy/tests/ui/err_expect.fixed
+++ b/src/tools/clippy/tests/ui/err_expect.fixed
@@ -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.expect_err("17");
+}