Open xldenis opened 1 year ago
Minified example:
extern crate creusot_contracts;
use creusot_contracts::*;
/// A vacant Entry.
pub struct VacantEntry<'a, K>
where
K: Ord + Eq,
{
map: &'a mut Vec<K>,
key: K,
index: usize,
}
impl<K> VacantEntry<'_, K>
where
K: Ord + Eq + Clone + DeepModel,
K::DeepModelTy: OrdLogic,
{
pub fn insert(&mut self) {
self.map.insert(self.index, self.key.clone())
}
}
That should not be very hard to debug.
Basically, Creusot uses the same temporary variable for self.map
and self.index
.
@jhaye reports that the following code creates ill typed why3 code.