#![warn(clippy::zero_sized_map_values)] use std::collections::BTreeMap; const CONST_OK: Option> = None; const CONST_NOT_OK: Option> = None; static STATIC_OK: Option> = None; static STATIC_NOT_OK: Option> = None; type OkMap = BTreeMap; type NotOkMap = BTreeMap; enum TestEnum { Ok(BTreeMap), NotOk(BTreeMap), } struct Test { ok: BTreeMap, not_ok: BTreeMap, also_not_ok: Vec>, } trait TestTrait { type Output; fn produce_output() -> Self::Output; fn weird_map(&self, map: BTreeMap); } impl Test { fn ok(&self) -> BTreeMap { todo!() } fn not_ok(&self) -> BTreeMap { todo!() } } impl TestTrait for Test { type Output = BTreeMap; fn produce_output() -> Self::Output { todo!(); } fn weird_map(&self, map: BTreeMap) { todo!(); } } fn test(map: BTreeMap, key: &str) -> BTreeMap { todo!(); } fn test2(map: BTreeMap, key: &str) -> BTreeMap { todo!(); } fn main() { let _: BTreeMap = BTreeMap::new(); let _: BTreeMap = BTreeMap::new(); let _: BTreeMap<_, _> = std::iter::empty::<(String, ())>().collect(); }