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
..
alloc Rollup merge of #107916 - reez12g:issue-107040, r=Amanieu 2023-05-30 12:57:38 +02:00
array Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
ascii Rename copying ascii::Char methods from as_ to to_ 2023-08-08 16:03:47 -07:00
async_iter use consistent terminology 2022-10-29 09:23:12 +02:00
cell Rollup merge of #109318 - joboet:better_fmt_placeholder, r=dtolnay 2023-07-31 22:51:12 +02:00
char impl TryFrom<char> for u16 2023-07-25 19:58:00 +02:00
cmp Merge two different equality specialization traits in core 2023-03-01 14:42:06 -08:00
convert use the correct link 2023-08-25 15:45:41 +08:00
ffi Inline strlen_rt in CStr::from_ptr 2023-08-18 09:19:09 +02:00
fmt Rollup merge of #109318 - joboet:better_fmt_placeholder, r=dtolnay 2023-07-31 22:51:12 +02:00
future Rollup merge of #109970 - danielhenrymantilla:add-poll-fn-pin-clarifications, r=thomcc 2023-06-19 19:26:25 +02:00
hash Swap out CURRENT_RUSTC_VERSION to 1.71.0 2023-05-30 07:54:29 -04:00
intrinsics Support bootstrap. 2023-09-01 16:18:50 +00:00
iter Auto merge of #115273 - the8472:take-fold, r=cuviper 2023-09-02 12:40:16 +00:00
macros improve panic.md edition disucssion, and nits 2023-08-28 12:11:19 +02:00
mem Auto merge of #113365 - dima74:diralik/add-deprecated-suggestions, r=workingjubilee 2023-08-22 00:02:50 +00:00
net Remove special cases that are no longer needed due to #112606 2023-08-25 03:54:28 +02:00
num Rollup merge of #114813 - RalfJung:fpu-control, r=Amanieu 2023-09-05 15:16:48 +02:00
ops Remove parens around .. in documentation snippet 2023-08-27 19:16:15 +02:00
panic avoid triple-backtrace due to panic-during-cleanup 2023-08-27 20:02:46 +02:00
prelude Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
ptr Rollup merge of #114794 - RalfJung:swap-safety, r=m-ou-se 2023-09-05 20:15:01 +02:00
slice Const-stabilize is_ascii 2023-09-01 11:02:09 -07:00
str Const-stabilize is_ascii 2023-09-01 11:02:09 -07:00
sync Auto merge of #114034 - Amanieu:riscv-atomicbool, r=thomcc 2023-07-27 01:00:12 +00:00
task Auto merge of #96875 - SabrinaJewson:noop-waker, r=m-ou-se 2023-06-07 06:04:32 +00:00
unicode Apply changes to fix python linting errors 2023-06-16 20:56:01 -04:00
any.rs core/any: remove Provider trait 2023-08-13 13:07:53 -06:00
arch.rs move core::arch into separate file 2022-11-20 10:28:14 +01:00
ascii.rs ascii::Char-ify the escaping code 2023-05-12 19:37:02 -07:00
asserting.rs [RFC 2011] Library code 2022-05-22 07:18:32 -03:00
bool.rs core is now compilable 2023-04-16 07:20:26 +00:00
borrow.rs doc: replace wrong punctuation mark 2023-07-28 14:46:17 +02:00
cell.rs Auto merge of #115166 - Urgau:invalid_ref_casting-invalid-unsafecell-usage, r=est31 2023-09-07 00:24:45 +00:00
clone.rs Explain more clearly why fn() -> T can't be #[derive(Clone)] 2023-07-30 18:04:38 +02:00
cmp.rs Optimized implementations of max, min, and clamp for bool 2023-08-10 22:38:30 -07:00
default.rs Remove default_free_fn feature 2023-07-08 12:10:12 +09:00
error.md Fix minor grammar typo 2023-09-06 09:47:22 -07:00
error.rs add missing feature(error_in_core) 2023-08-15 08:21:41 +02:00
escape.rs Rename copying ascii::Char methods from as_ to to_ 2023-08-08 16:03:47 -07:00
hint.rs Rollup merge of #108416 - pat-nel87:Issue-107957-black_box_docs, r=jyn514 2023-04-26 01:55:49 -05:00
internal_macros.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00
intrinsics.rs Rollup merge of #114794 - RalfJung:swap-safety, r=m-ou-se 2023-09-05 20:15:01 +02:00
lib.rs Rollup merge of #114412 - RalfJung:libc-symbols, r=pnkfelix 2023-09-05 15:16:47 +02:00
marker.rs Revert "Suggest using Arc on !Send/!Sync types" 2023-08-28 03:16:48 -07:00
option.rs Add alignment to the NPO guarantee 2023-08-15 02:37:34 -07:00
panic.rs Shorten lifetime of even more panic temporaries 2023-05-15 03:47:37 -07:00
panicking.rs avoid triple-backtrace due to panic-during-cleanup 2023-08-27 20:02:46 +02:00
pin.rs Document Pin memory layout 2023-05-18 01:30:12 -04:00
primitive_docs.rs resolve conflicts 2023-08-18 15:22:58 +08:00
primitive.rs
result.rs Rollup merge of #112655 - WaffleLapkin:must_use_map_or, r=workingjubilee 2023-07-30 14:25:08 +02:00
time.rs Fix implementation of Duration::checked_div 2023-07-30 04:00:02 -04:00
tuple.rs Flip cfg's for bootstrap bump 2023-07-12 21:38:55 -04:00
unit.rs