creusot-std 0.15.0

Standard library of Creusot: provides specification macros, contracts for Rust standard library and logic helpers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::prelude::*;
#[cfg(creusot)]
use core::cell::UnsafeCell;

extern_spec! {
    impl<T> UnsafeCell<T> {
        #[check(ghost)]
        fn new(value: T) -> UnsafeCell<T>;
    }

    impl<T: ?Sized> UnsafeCell<T> {
        #[check(ghost)]
        fn get(&self) -> *mut T;
    }
}