Skip to content

Conversation

LegNeato
Copy link
Collaborator

@LegNeato LegNeato commented Apr 9, 2025

Migrated from EmbarkStudios/rust-gpu#1143

closes #85
original issue: EmbarkStudios/rust-gpu#1061

@149segolte
Copy link

@LegNeato Works. I haven't done extensive testing but the project I am working on does comppile with this. Previously I was using:

let mut seed_array = [1i32; 56];
for i in 0..56 {
    seed_array[i] = 0;
}

Now I am able to directly do: [0i32; 56].

@LegNeato LegNeato enabled auto-merge April 9, 2025 17:49
@LegNeato
Copy link
Collaborator Author

LegNeato commented Apr 9, 2025

Thanks @JulianKnodt for the original fix!

@Firestar99
Copy link
Member

Firestar99 commented Apr 9, 2025

btw in compiletest you can put multiple entry points in a single file if you just want to check that they compile and not disassemble them
(feel free to change or merge)

@Firestar99 Firestar99 disabled auto-merge April 9, 2025 17:54
@LegNeato LegNeato added this pull request to the merge queue Apr 9, 2025
@LegNeato
Copy link
Collaborator Author

LegNeato commented Apr 9, 2025

Yeah, those were just the original tests and figure it doesn't hurt really.

Merged via the queue into Rust-GPU:main with commit ac0c703 Apr 9, 2025
7 checks passed
@LegNeato LegNeato deleted the fix_0i32 branch April 9, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Migrated] Array init with 0i32 uses 0u32 instead.
4 participants