rl_lang/docs/entries/stdlib/debug/
dbg.rs1use crate::docs::entry::FnEntry;
2
3pub static DBG: FnEntry = FnEntry {
4 signature: "dbg(value)",
5 description: "prints `value` and its type, then returns `value` unchanged, so it can be dropped inline into an expression without restructuring code",
6 example: r#"
7get std::debug::dbg
8
9dec int x = dbg(2 + 2)
10 "#,
11 expected_output: Some("[dbg] 4 (int)"),
12 returns: "same type as `value`",
13 errors: None,
14 see_also: &["type_of"],
15 since: Some("v0.1.5"),
16};