22 lines
284 B
Plaintext
22 lines
284 B
Plaintext
// Arithmetic, function calls and imports!
|
|
|
|
struct Test {
|
|
field: i32,
|
|
second: [u32; 4]
|
|
}
|
|
|
|
fn test() -> [Test; 1] {
|
|
let value = [Test {
|
|
field: 5,
|
|
second: [6, 3, 4, 8],
|
|
}];
|
|
return value;
|
|
}
|
|
|
|
fn main() -> u32 {
|
|
let mut value = test();
|
|
|
|
|
|
return value[0].second[2];
|
|
}
|