MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / destructure_inside_if_branch

Function destructure_inside_if_branch

tests/integration/struct_destructuring.rs:126–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124fn local_struct_variable_destructured() {
125 compile_ok(
126 r#"
127main: () -> i32 {
128 p: { x: i32, y: i32 } = { .x = 10, .y = 20 }
129 { x: i32, y: i32 } = p
130 return x + y
131}
132"#,
133 );
134}
135
136// -- Composition and context ---------------------------------------------------
137
138#[test]
139fn destructure_inside_if_branch() {
140 compile_ok(
141 r#"

Callers

nothing calls this directly

Calls 1

compile_okFunction · 0.70

Tested by

no test coverage detected