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

Function leak

crates/common/src/static_cell.rs:64–66  ·  view source on GitHub ↗
(x: T)

Source from the content-addressed store, hash-verified

62 }
63
64 fn leak<T>(x: T) -> &'static T {
65 Box::leak(Box::new(x))
66 }
67
68 impl<T> StaticCell<T> {
69 #[doc(hidden)]

Callers 9

js_errorFunction · 0.85
make_stdout_objectFunction · 0.85
setMethod · 0.85
get_or_initMethod · 0.85
get_or_try_initMethod · 0.85
initialize_main_vmFunction · 0.85
new_method_defMethod · 0.85
fromMethod · 0.85
swapMethod · 0.85

Calls 1

newFunction · 0.85

Tested by

no test coverage detected