2667d853a6
Improve `invalid_reference_casting` lint This PR improves the `invalid_reference_casting` lint: - by considering an unlimited number of casts instead only const to mut ptr - by also considering ptr-to-integer and integer-to-ptr casts - by also taking into account [`ptr::cast`](https://doc.rust-lang.org/std/primitive.pointer.html#method.cast), [`ptr::cast`](https://doc.rust-lang.org/std/primitive.pointer.html#method.cast-1) and [`ptr::cast_const`](https://doc.rust-lang.org/std/primitive.pointer.html#method.cast_const) Most of this improvements comes from skimming Github Code Search result for [`&mut \*.*as \*const`](https://github.com/search?q=lang%3Arust+%2F%26mut+%5C*.*as+%5C*const%2F&type=code) r? ``@est31`` (maybe) |
||
---|---|---|
.. | ||
nonstandard_style | ||
array_into_iter.rs | ||
builtin.rs | ||
context.rs | ||
deref_into_dyn_supertrait.rs | ||
drop_forget_useless.rs | ||
early.rs | ||
enum_intrinsics_non_enums.rs | ||
errors.rs | ||
expect.rs | ||
for_loops_over_fallibles.rs | ||
foreign_modules.rs | ||
hidden_unicode_codepoints.rs | ||
internal.rs | ||
invalid_from_utf8.rs | ||
late.rs | ||
let_underscore.rs | ||
levels.rs | ||
lib.rs | ||
lints.rs | ||
map_unit_fn.rs | ||
methods.rs | ||
multiple_supertrait_upcastable.rs | ||
non_ascii_idents.rs | ||
non_fmt_panic.rs | ||
nonstandard_style.rs | ||
noop_method_call.rs | ||
opaque_hidden_inferred_bound.rs | ||
pass_by_value.rs | ||
passes.rs | ||
ptr_nulls.rs | ||
redundant_semicolon.rs | ||
reference_casting.rs | ||
tests.rs | ||
traits.rs | ||
types.rs | ||
unused.rs |