]> git.proxmox.com Git - rustc.git/blobdiff - library/std/src/collections/hash/map/tests.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / library / std / src / collections / hash / map / tests.rs
index cb3032719fa64287bd56c757513bb8a0b0f64922..65634f2063f36da25633548a6be59ce94a7dda21 100644 (file)
@@ -1115,3 +1115,9 @@ fn from_array() {
     // that's a problem!
     let _must_not_require_type_annotation = HashMap::from([(1, 2)]);
 }
+
+#[test]
+fn const_with_hasher() {
+    const X: HashMap<(), (), ()> = HashMap::with_hasher(());
+    assert_eq!(X.len(), 0);
+}