Skip to main content

btree_map_wf

Function btree_map_wf 

Source
pub uninterp spec fn btree_map_wf<Key, Value, A: AllocatorClone>(
    m: &BTreeMap<Key, Value, A>,
) -> bool
Expand description

Whether the map’s entries are arranged as the tree requires, so that its view describes what its operations do. The specified operations build well-formed maps, and keep a map well formed. Safe code can build malformed maps, though: for example by cloning a map whose key type’s Clone changes the key (see obeys_clone_eq; the copy holds the changed keys at the positions of the originals), or through a Borrow that disagrees with the key’s Ord. So a map from unverified code is not known to be well formed.

This depends on the map value, not only its view: a malformed copy can have the same view as the well-formed original.