summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs')
-rw-r--r--src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs b/src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs
index 035169fab..2fb140efa 100644
--- a/src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs
+++ b/src/tools/clippy/tests/ui/cfg_attr_rustfmt.rs
@@ -1,5 +1,5 @@
// run-rustfix
-#![feature(stmt_expr_attributes)]
+#![feature(stmt_expr_attributes, custom_inner_attributes)]
#![allow(unused, clippy::no_effect, clippy::unnecessary_operation)]
#![warn(clippy::deprecated_cfg_attr)]
@@ -29,3 +29,17 @@ mod foo {
pub fn f() {}
}
+
+fn msrv_1_29() {
+ #![clippy::msrv = "1.29"]
+
+ #[cfg_attr(rustfmt, rustfmt::skip)]
+ 1+29;
+}
+
+fn msrv_1_30() {
+ #![clippy::msrv = "1.30"]
+
+ #[cfg_attr(rustfmt, rustfmt::skip)]
+ 1+30;
+}