1 #![warn(clippy::zero_sized_map_values)]
2 use std::collections::BTreeMap;
4 const CONST_OK: Option<BTreeMap<String, usize>> = None;
5 const CONST_NOT_OK: Option<BTreeMap<String, ()>> = None;
7 static STATIC_OK: Option<BTreeMap<String, usize>> = None;
8 static STATIC_NOT_OK: Option<BTreeMap<String, ()>> = None;
10 type OkMap = BTreeMap<String, usize>;
11 type NotOkMap = BTreeMap<String, ()>;
14 Ok(BTreeMap<String, usize>),
15 NotOk(BTreeMap<String, ()>),
19 ok: BTreeMap<String, usize>,
20 not_ok: BTreeMap<String, ()>,
22 also_not_ok: Vec<BTreeMap<usize, ()>>,
28 fn produce_output() -> Self::Output;
30 fn weird_map(&self, map: BTreeMap<usize, ()>);
34 fn ok(&self) -> BTreeMap<String, usize> {
38 fn not_ok(&self) -> BTreeMap<String, ()> {
43 impl TestTrait for Test {
44 type Output = BTreeMap<String, ()>;
46 fn produce_output() -> Self::Output {
50 fn weird_map(&self, map: BTreeMap<usize, ()>) {
55 fn test(map: BTreeMap<String, ()>, key: &str) -> BTreeMap<String, ()> {
59 fn test2(map: BTreeMap<String, usize>, key: &str) -> BTreeMap<String, usize> {
64 let _: BTreeMap<String, ()> = BTreeMap::new();
65 let _: BTreeMap<String, usize> = BTreeMap::new();
67 let _: BTreeMap<_, _> = std::iter::empty::<(String, ())>().collect();