pub fn check_mut(&self) {
        rt::execution(|execution| {
            let immut_access_version = self.immut_access_version.borrow();
            let mut mut_access_version = self.mut_access_version.borrow_mut();

            let thread_id = execution.threads.active_id();
            let thread_causality = &execution.threads.active().causality;

            // Check that there is no concurrent mutable access, i.e., the last
            // mutable access must happen-before this mutable access.

            assert!(
                *mut_access_version <= *thread_causality,
                "Causality violation: \
                 Concurrent mutable accesses: \
                 cell.with_mut: v={:?}; mut v={:?}; thread[{}]={:?}",
                immut_access_version,
                mut_access_version,
                thread_id,
                thread_causality,
            );

            // Check that there are no concurrent immutable accesss, i.e., every
            // immutable access must happen-before this mutable access.

            assert!(
                *immut_access_version <= *thread_causality,
                "Causality violation: \
                 Concurrent mutable access and immutable access(es): \
                 cell.with_mut: v={:?}; mut v={:?}; thread[{}]={:?}",
                immut_access_version,
                mut_access_version,
                thread_id,
                thread_causality,
            );

            // Record the vector clock time of this mutable access.
            //
            // Note that the first assertion:
            // `mut_access_version <= thread_causality` implies
            // `mut_access_version.join(thread_causality) == thread_causality`.

            mut_access_version.copy_from(thread_causality);
        });
    }
/// Check that the current thread can make a mutable access without violating
/// the Rust memory model.
///
/// Specifically, this function checks that there is no concurrent mutable
/// access and no concurrent immutable access(es) with this mutable access.
Check that the current thread can make a mutable access without violating
the Rust memory model.

Specifically, this function checks that there is no concurrent mutable
access and no concurrent immutable access(es) with this mutable access.
Check that the current thread can make a mutable access without violating the Rust memory model . Specifically this function checks that there is no concurrent mutable access and no concurrent immutable access ( es ) with this mutable access .
pub fn check_mut(&self) {
        rt::execution(|execution| {
            let immut_access_version = self.immut_access_version.borrow();
            let mut mut_access_version = self.mut_access_version.borrow_mut();
            let thread_id = execution.threads.active_id();
            let thread_causality = &execution.threads.active().causality;
            // Check that there is no concurrent mutable access, i.e., the last
            // mutable access must happen-before this mutable access.
            assert!(
                *mut_access_version <= *thread_causality,
                "Causality violation: \
                 Concurrent mutable accesses: \
                 cell.with_mut: v={:?}; mut v={:?}; thread[{}]={:?}",
                immut_access_version,
                mut_access_version,
                thread_id,
                thread_causality,
            );
            // Check that there are no concurrent immutable accesss, i.e., every
            // immutable access must happen-before this mutable access.
            assert!(
                *immut_access_version <= *thread_causality,
                "Causality violation: \
                 Concurrent mutable access and immutable access(es): \
                 cell.with_mut: v={:?}; mut v={:?}; thread[{}]={:?}",
                immut_access_version,
                mut_access_version,
                thread_id,
                thread_causality,
            );
            // Record the vector clock time of this mutable access.
            //
            // Note that the first assertion:
            // `mut_access_version <= thread_causality` implies
            // `mut_access_version.join(thread_causality) == thread_causality`.
            mut_access_version.copy_from(thread_causality);
        });
    }
pub fn check_mut ( & self ) { rt :: execution ( | execution | { let immut_access_version = self . immut_access_version . borrow ( ) ; let mut mut_access_version = self . mut_access_version . borrow_mut ( ) ; let thread_id = execution . threads . active_id ( ) ; let thread_causality = & execution . threads . active ( ) . causality ; // Check that there is no concurrent mutable access, i.e., the last // mutable access must happen-before this mutable access. assert ! ( mut_access_version thread_causality " \
 \
 " immut_access_version mut_access_version thread_id thread_causality ) ; // Check that there are no concurrent immutable accesss, i.e., every // immutable access must happen-before this mutable access. assert ! ( immut_access_version thread_causality " \
 \
 " immut_access_version mut_access_version thread_id thread_causality ) ; // Record the vector clock time of this mutable access. // // Note that the first assertion: // `mut_access_version <= thread_causality` implies // `mut_access_version.join(thread_causality) == thread_causality`. mut_access_version . copy_from ( thread_causality ) ; } ) ; }
Check that the current thread can make a mutable access without violating
the Rust memory model.
Check that the current thread can make a mutable access without violating the Rust memory model .
&self
&self