//! Calling scope() while already inside a scope() should not compile
//! (&mut self prevents nesting via borrow checker).
usesurelock::key_handle::KeyHandle;fnmain(){letmut handle =KeyHandle::claim();
handle.scope(|_key1|{// handle is &mut borrowed by the outer scope.
// Calling scope again should fail:
handle.scope(|_key2|{// two independent keys -- deadlock risk
});});}