kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
428 stars 21 forks source link

Can't build vangers v0.3.0 (rustc 1.80.0 (051478957 2024-07-21)) #243

Closed caiiiycuk closed 1 month ago

caiiiycuk commented 1 month ago

I trying to run tool for word -> obj conversion with following command:

cargo run --release --bin convert -- /x/games/Vangers\ RU/game/thechain/fostral/world.ini tmp/fostral.obj

Whenever I do this I have a lot of errors like this:

error: unnecessary qualification
  --> src/render/water.rs:93:35
   |
93 |             size: (max_vertices * mem::size_of::<Vertex>()) as wgpu::BufferAddress,
   |                                   ^^^^^^^^^^^^^^^^^^^^^^
   |
help: remove the unnecessary path segments
   |
93 -             size: (max_vertices * mem::size_of::<Vertex>()) as wgpu::BufferAddress,
93 +             size: (max_vertices * size_of::<Vertex>()) as wgpu::BufferAddress,

I understand that this is a lint error. I tried lot of ways to disable it, but nothing works for me. Please point me how to workaround this.

Last thing I tried that should work, but didn't:

RUSTFLAGS="-A unused_qualifications" cargo run --release --bin convert -- /x/games/Vangers\ RU/game/thechain/fostral/world.ini tmp/fostral.obj
caiiiycuk commented 1 month ago

1.68.0, 1.75.0 - compile without problems

kvark commented 1 month ago

Whoa, did Rust just included size_of in the prelude? I wonder how to properly set up the lint in this case. Could you replace "mem::size_of" by "size_of" locally? I'm on nixOS where getting latest Rust is a bit of a pain.

kvark commented 1 month ago

Should be fixed in 74e61d5e4c6bf0ff0b31318f4222173e33206f32