We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
incompatible_msrv
1 parent 5d811a4 commit c3038d0Copy full SHA for c3038d0
tests/ui/incompatible_msrv.rs
@@ -0,0 +1,18 @@
1
+#![warn(clippy::incompatible_msrv)]
2
+#![feature(custom_inner_attributes)]
3
+#![clippy::msrv = "1.10.0"]
4
+
5
+use std::collections::hash_map::Entry;
6
+use std::collections::HashMap;
7
8
+fn foo() {
9
+ let mut map: HashMap<&str, u32> = HashMap::new();
10
+ // Stable since 1.10, so should not warn.
11
+ assert_eq!(map.entry("poneyland").key(), &"poneyland");
12
+ if let Entry::Vacant(v) = map.entry("poneyland") {
13
+ v.into_key();
14
+ //~^ ERROR: bla
15
+ }
16
+}
17
18
+fn main() {}
0 commit comments