mirror of
https://github.com/bevyengine/bevy
synced 2024-12-29 22:43:14 +00:00
c1a4e29a1e
# Objective Since rust `1.76`, [`ptr::from_ref`](https://doc.rust-lang.org/stable/std/ptr/fn.from_ref.html) and [`ptr::from_mut`](https://doc.rust-lang.org/stable/std/ptr/fn.from_mut.html) are stable. This PR replaces code that use `as` casting by one of `ptr::from_ref`, `ptr::from_mut`, `cast_mut`, `cast_const`, or `cast` methods, which are less error-prone. ## Solution - Bump MSRV to `1.76.0` - Enables the following clippy lints: - [`ptr_as_ptr`](https://rust-lang.github.io/rust-clippy/master/index.html#/ptr_as_ptr) - [`ptr_cast_constness`](https://rust-lang.github.io/rust-clippy/master/index.html#/ptr_cast_constness) - [`ref_as_ptr`](https://rust-lang.github.io/rust-clippy/master/index.html#/ref_as_ptr) (I fix all warnings for this one, but it requires rust 1.77 to be enabled) - Fix the lints mentioned above |
||
---|---|---|
.. | ||
cow_arc.rs | ||
default.rs | ||
float_ord.rs | ||
futures.rs | ||
intern.rs | ||
label.rs | ||
lib.rs | ||
once.rs | ||
short_names.rs | ||
synccell.rs | ||
syncunsafecell.rs | ||
uuid.rs |