feat: add support for *T pointers

This commit is contained in:
2026-04-22 23:14:53 +02:00
parent 8bcae8cb31
commit f3c93fa516
10 changed files with 282 additions and 33 deletions
+16
View File
@@ -0,0 +1,16 @@
[code]
fn swap(a: *i32, b: *i32) {
let temp = *a;
*a = *b;
*b = temp;
}
fn main() -> i32 {
let x = 10;
let y = 20;
swap(&x, &y);
return x - y; // 20 - 10 = 10
}
[expected_return_code]
10