rl_lang/docs/entries/stdlib/debug/
unreachable.rs1use crate::docs::entry::FnEntry;
2
3pub static UNREACHABLE: FnEntry = FnEntry {
4 signature: "unreachable(msg?)",
5 description: "marks a code path that should never execute; errors immediately if it is ever reached",
6 example: r#"
7get std::debug::unreachable
8
9match true {
10 true => {}
11 false => {
12 unreachable("default arm should be impossible")
13 }
14}"#,
15 expected_output: None,
16 returns: "never returns",
17 errors: Some("always raises a runtime error"),
18 see_also: &["panic", "todo"],
19 since: Some("v0.1.5"),
20};