Skip to main content

rl_lang/docs/entries/stdlib/debug/
panic.rs

1use crate::docs::entry::FnEntry;
2
3pub static PANIC: FnEntry = FnEntry {
4    signature: "panic(msg?)",
5    description: "unconditionally errors with `msg`, or \"explicit panic\" if omitted; signals a programming bug rather than a recoverable failure value",
6    example: r#"
7get std::debug::panic
8
9panic("unreachable configuration")"#,
10    expected_output: None,
11    returns: "never returns",
12    errors: Some("always raises a runtime error"),
13    see_also: &["unreachable", "todo"],
14    since: Some("v0.1.5"),
15};