rust/library
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
..
alloc Auto merge of #113859 - Manishearth:vec-as-mut-ptr-stacked-borrow, r=dtolnay 2023-08-29 06:04:55 +00:00
backtrace@99faef833f
core Auto merge of #115166 - Urgau:invalid_ref_casting-invalid-unsafecell-usage, r=est31 2023-09-07 00:24:45 +00:00
panic_abort
panic_unwind
portable-simd
proc_macro
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #115453 - ibraheemdev:patch-16, r=joshtriplett 2023-09-06 08:00:25 +00:00
stdarch@6100854c4b Bump stdarch submodule 2023-09-05 19:56:20 +02:00
sysroot
test
unwind