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
..
2023-09-12 07:27:17 +02:00
2023-08-30 15:09:40 -07:00
2023-09-10 21:20:36 +00:00
2023-09-01 12:40:01 +00:00
2023-09-08 08:44:23 +02:00
2023-09-11 17:03:32 +02:00
2023-09-11 12:51:07 +10:00
2023-09-01 06:36:02 +05:30
2023-09-11 12:41:30 +00:00
2023-08-30 15:09:40 -07:00
2023-09-11 18:10:07 +00:00
2023-09-03 19:31:47 +00:00
2023-09-11 23:08:40 +03:00
2023-09-10 21:20:36 +00:00
2023-09-11 17:03:32 +02:00
2023-09-14 11:56:55 +02:00
2023-09-10 21:20:36 +00:00
2023-09-08 12:46:06 +01:00
2023-09-06 12:09:29 +03:00
2023-09-10 21:20:36 +00:00
2023-09-10 21:20:36 +00:00
2023-09-12 06:34:46 +02:00
2023-09-13 15:00:31 +00:00
2023-09-14 13:01:54 +10:00
2023-09-06 09:05:07 +05:30
2023-09-10 21:20:36 +00:00
2023-09-10 23:06:14 +02:00
2023-09-10 21:20:36 +00:00
2023-09-14 15:16:48 +00:00
2023-09-05 11:15:05 +02:00
2023-09-13 16:38:05 +08:00
2023-08-30 11:55:03 +00:00
2023-09-11 17:03:32 +02:00
2023-09-11 21:16:22 +02:00
2023-09-14 03:49:59 +00:00
2023-09-12 13:41:42 +02:00
2023-09-01 14:08:31 -07:00
2023-09-16 03:40:20 +00:00
2023-09-04 14:21:38 +02:00
2023-09-03 19:55:11 +08:00
2023-09-13 15:00:31 +00:00
2023-09-11 18:10:07 +00:00
2023-09-10 21:20:36 +00:00
2023-09-10 21:20:36 +00:00
2023-08-30 14:10:52 +00:00
2023-09-02 05:08:38 +00:00
2023-09-10 21:20:36 +00:00
2023-09-12 16:38:59 +02:00
2023-09-07 11:07:33 +08:00
2023-09-07 06:48:24 +00:00
2023-09-10 21:20:36 +00:00
2023-09-06 09:05:07 +05:30
2023-08-30 15:09:40 -07:00
2023-09-11 17:03:32 +02:00
2023-09-15 00:05:28 +00:00
2023-08-30 20:43:31 +02:00
2023-09-08 15:12:17 +02:00
2023-09-10 21:20:36 +00:00
2023-09-10 21:20:36 +00:00
2023-08-30 15:09:40 -07:00
2023-09-10 21:20:36 +00:00
2023-09-01 12:40:01 +00:00
2023-09-11 12:51:07 +10:00
2023-09-10 21:20:36 +00:00
2023-09-15 05:11:16 +00:00
2023-09-06 06:48:34 +08:00
2023-09-10 21:20:36 +00:00
2023-09-10 23:06:14 +02:00
2023-09-14 15:16:48 +00:00
2023-09-10 21:20:36 +00:00
2023-09-14 11:52:08 +00:00
2023-09-13 23:07:39 +08:00
2023-09-10 21:20:36 +00:00
2023-09-10 21:20:36 +00:00
2023-09-04 14:21:38 +02:00
2023-09-11 18:10:07 +00:00
2023-09-10 23:06:14 +02:00
2023-09-10 23:06:14 +02:00
2023-09-04 14:21:38 +02:00
2023-09-10 23:06:14 +02:00
2023-09-10 23:06:14 +02:00
2023-08-30 15:09:40 -07:00