rust/compiler/rustc_span/src
Matthias Krüger 2667d853a6
Rollup merge of #114784 - Urgau:many-improve-invalid_reference_casting-lint, r=est31
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)
2023-08-16 20:10:37 +02:00
..
analyze_source_file
edit_distance Add test for precise algorithm used 2023-02-19 22:59:22 +00:00
source_map Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov 2023-01-19 05:23:40 +00:00
symbol Move the Lock into symbol::Interner 2021-09-15 18:46:45 +02:00
analyze_source_file.rs more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
caching_source_map_view.rs Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
def_id.rs Use {Local}ModDefId in many queries 2023-08-14 07:22:48 +00:00
edit_distance.rs Rollup merge of #114351 - ttsugriy:sort-by-words, r=fee1-dead 2023-08-04 21:31:56 +02:00
edition.rs Make it clearer that edition functions are >=, not == 2023-07-19 16:38:35 +00:00
fatal_error.rs Make fatal DiagnosticBuilder yield never 2022-03-27 22:25:32 -07:00
hygiene.rs Add SyntaxContext::is_root 2023-06-16 13:47:42 +00:00
lib.rs Auto merge of #112500 - lukas-code:span-ctxt, r=petrochenkov 2023-08-16 14:47:01 +00:00
profiling.rs Remove an unnecessary use of with_session_globals. 2023-03-31 15:34:00 +11:00
source_map.rs refactor on span_look_ahead 2023-08-06 22:44:11 +08:00
span_encoding.rs Refactor SyntaxContext::ctxt logic. 2023-04-18 18:00:21 +00:00
symbol.rs Rollup merge of #114784 - Urgau:many-improve-invalid_reference_casting-lint, r=est31 2023-08-16 20:10:37 +02:00
tests.rs Store hashes in special types so they aren't accidentally encoded as numbers 2023-04-18 10:52:47 -04:00