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