Files
rust/library/core/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
..
2022-10-29 09:23:12 +02:00
2023-07-25 19:58:00 +02:00
2023-08-25 15:45:41 +08:00
2023-08-18 09:19:09 +02:00
2023-09-01 16:18:50 +00:00
2023-09-01 11:02:09 -07:00
2023-09-01 11:02:09 -07:00
2023-08-13 13:07:53 -06:00
2022-11-20 10:28:14 +01:00
2023-05-12 19:37:02 -07:00
2022-05-22 07:18:32 -03:00
2023-04-16 07:20:26 +00:00
2023-07-28 14:46:17 +02:00
2023-07-08 12:10:12 +09:00
2023-09-06 09:47:22 -07:00
2023-08-15 08:21:41 +02:00
2023-04-16 06:49:27 +00:00
2023-08-15 02:37:34 -07:00
2023-05-18 01:30:12 -04:00
2023-08-18 15:22:58 +08:00
2023-07-12 21:38:55 -04:00