rust/library
bors 635c4a5e61 Auto merge of #114494 - est31:extend_useless_ptr_null_checks, r=jackh726
Make useless_ptr_null_checks smarter about some std functions

This teaches the `useless_ptr_null_checks` lint that some std functions can't ever return null pointers, because they need to point to valid data, get references as input, etc.

This is achieved by introducing an `#[rustc_never_returns_null_ptr]` attribute and adding it to these std functions (gated behind bootstrap `cfg_attr`).

Later on, the attribute could maybe be used to tell LLVM that the returned pointer is never null. I don't expect much impact of that though, as the functions are pretty shallow and usually the input data is already never null.

Follow-up of PR #113657

Fixes #114442
2023-09-16 03:40:20 +00:00
..
alloc Auto merge of #114494 - est31:extend_useless_ptr_null_checks, r=jackh726 2023-09-16 03:40:20 +00:00
backtrace@99faef833f Bump backtrace to 0.3.69 2023-08-22 15:01:14 -07:00
core Auto merge of #114494 - est31:extend_useless_ptr_null_checks, r=jackh726 2023-09-16 03:40:20 +00:00
panic_abort Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
panic_unwind Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
portable-simd remove repetitive words 2023-07-31 16:13:02 +08:00
proc_macro Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
profiler_builtins Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Disabled socketpair for Vita 2023-09-13 16:41:38 +03:00
stdarch@6100854c4b Bump stdarch submodule 2023-09-05 19:56:20 +02:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
unwind Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00