djeedai / bevy_hanabi

๐ŸŽ† Hanabi โ€” a GPU particle system plugin for the Bevy game engine.
Apache License 2.0
927 stars 73 forks source link

Crate fails to build #351

Closed tychedelia closed 2 months ago

tychedelia commented 2 months ago

Due to https://github.com/rust-lang/rust/pull/123168

error: unnecessary qualification
  --> src/render/aligned_buffer_vec.rs:53:25
   |
53 |         let item_size = std::mem::size_of::<T>();
   |                         ^^^^^^^^^^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> src/lib.rs:10:5
   |
10 |     unused_qualifications,
   |     ^^^^^^^^^^^^^^^^^^^^^
help: remove the unnecessary path segments
   |
53 -         let item_size = std::mem::size_of::<T>();
53 +         let item_size = size_of::<T>();
   |

error: unnecessary qualification
   --> src/render/buffer_table.rs:119:25
    |
119 |         let item_size = std::mem::size_of::<T>();
    |                         ^^^^^^^^^^^^^^^^^^^^^^
    |
help: remove the unnecessary path segments
    |
119 -         let item_size = std::mem::size_of::<T>();
119 +         let item_size = size_of::<T>();
    |

error: unnecessary qualification
   --> src/render/effect_cache.rs:325:55
    |
325 | ...   min_binding_size: BufferSize::new(std::mem::size_of::<u32>() as u64),
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: remove the unnecessary path segments
    |
325 -                     min_binding_size: BufferSize::new(std::mem::size_of::<u32>() as u64),
325 +                     min_binding_size: BufferSize::new(size_of::<u32>() as u64),
    |

error: could not compile `bevy_hanabi` (lib) due to 3 previous errors
djeedai commented 2 months ago

I don't understand, I built with nightly yesterday for release, and docs.rs too. Why didn't they catch that? ๐Ÿค”

tychedelia commented 2 months ago

I've no idea why this wouldn't be an issue with the docs.rs build, however I just tested again on a different platform with a fresh nightly compiler and got the same error. If you looked at the linked issue, other people are running into this in other projects so it's definitely not just me: https://github.com/rust-lang/rust/issues/127406.

tychedelia commented 2 months ago

This is now an issue on stable with the release of 1.80.

djeedai commented 2 months ago

CI can repro here. I'll try to fix when I have time.

djeedai commented 2 months ago

@tychedelia > Just released v0.12.1 with that fix.

tychedelia commented 2 months ago

@tychedelia > Just released v0.12.1 with that fix.

Thank you! ๐Ÿงก