MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / test_borrow_mut_while_borrow

Function test_borrow_mut_while_borrow

tests/test_sharedref.rs:126–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124#[test]
125#[should_panic(expected = "already borrowed")]
126fn test_borrow_mut_while_borrow() {
127 let (gil, owner) = prepare_env();
128 let py = gil.python();
129 let _ref = owner.string(py).borrow();
130 owner.string(py).borrow_mut();
131}
132
133#[test]
134fn test_try_borrow_while_borrow_mut() {

Callers

nothing calls this directly

Calls 4

prepare_envFunction · 0.85
pythonMethod · 0.80
borrowMethod · 0.80
borrow_mutMethod · 0.80

Tested by

no test coverage detected