MCPcopy Index your code
hub / github.com/RustPython/RustPython / drop

Method drop

crates/vm/src/frame.rs:462–470  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

460
461impl Drop for LocalsPlusStackDrain<'_> {
462 fn drop(&mut self) {
463 while self.current < self.end {
464 let idx = self.localsplus.nlocalsplus as usize + self.current;
465 let data = self.localsplus.data_as_mut_slice();
466 let raw = core::mem::replace(&mut data[idx], 0);
467 let _ = unsafe { core::mem::transmute::<usize, Option<PyStackRef>>(raw) };
468 self.current += 1;
469 }
470 }
471}
472
473impl Drop for LocalsPlus {

Callers

nothing calls this directly

Calls 3

data_as_mut_sliceMethod · 0.80
drop_valuesMethod · 0.80
replaceFunction · 0.50

Tested by

no test coverage detected