rust/compiler/rustc_span/src
bors 4e5b31c2b0 Auto merge of #115166 - Urgau:invalid_ref_casting-invalid-unsafecell-usage, r=est31
Lint on invalid usage of `UnsafeCell::raw_get` in reference casting

This PR proposes to take into account `UnsafeCell::raw_get` method call for non-Freeze types for the `invalid_reference_casting` lint.

The goal of this is to catch those kind of invalid reference casting:
```rust
fn as_mut<T>(x: &T) -> &mut T {
    unsafe { &mut *std::cell::UnsafeCell::raw_get(x as *const _ as *const _) }
    //~^ ERROR casting `&T` to `&mut T` is undefined behavior
}
```

r? `@est31`
2023-09-07 00:24:45 +00:00
..
analyze_source_file Use relative positions inside a SourceFile. 2023-09-03 12:56:10 +00:00
edit_distance Add test for precise algorithm used 2023-02-19 22:59:22 +00:00
source_map Register the file while computing its start position. 2023-09-03 15:02:46 +00:00
symbol Move the Lock into symbol::Interner 2021-09-15 18:46:45 +02:00
analyze_source_file.rs Use relative positions inside a SourceFile. 2023-09-03 12:56:10 +00:00
caching_source_map_view.rs Use relative positions inside a SourceFile. 2023-09-03 12:56:10 +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 Rollup merge of #115081 - Zoxc:expn-id-decode, r=cjgillot 2023-08-25 09:00:12 +02:00
lib.rs Remove always-zero field. 2023-09-04 16:02:46 +00:00
profiling.rs Remove an unnecessary use of with_session_globals. 2023-03-31 15:34:00 +11:00
source_map.rs Pass StableSourceFileId. 2023-09-04 16:02:46 +00:00
span_encoding.rs Refactor SyntaxContext::ctxt logic. 2023-04-18 18:00:21 +00:00
symbol.rs Auto merge of #115166 - Urgau:invalid_ref_casting-invalid-unsafecell-usage, r=est31 2023-09-07 00:24:45 +00:00
tests.rs Register the file while computing its start position. 2023-09-03 15:02:46 +00:00