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

Function unwrap_internal

crates/codegen/src/compile.rs:364–372  ·  view source on GitHub ↗
(zelf: &Compiler, r: InternalResult<T>)

Source from the content-addressed store, hash-verified

362/// Better traceback for internal error
363#[track_caller]
364fn unwrap_internal<T>(zelf: &Compiler, r: InternalResult<T>) -> T {
365 if let Err(ref r_err) = r {
366 eprintln!("=== CODEGEN PANIC INFO ===");
367 eprintln!("This IS an internal error: {r_err}");
368 eprint_location(zelf);
369 eprintln!("=== END PANIC INFO ===");
370 }
371 r.unwrap()
372}
373
374fn compiler_unwrap_option<T>(zelf: &Compiler, o: Option<T>) -> T {
375 if o.is_none() {

Callers 3

exit_scopeMethod · 0.85
exit_annotation_scopeMethod · 0.85

Calls 2

eprint_locationFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected