Jonathan Brouwer
1d7ce9f430
Rollup merge of #147876 - Shunpoco:lint-check-tainted-error, r=oli-obk
...
Check tainted_by_error in LateLint
## Context
This PR continues from https://github.com/rust-lang/rust/pull/138679#discussion_r2436522856 .
In the last PR, I introduced typeck result's tainted_by_error in check_pat. But as we've discussed, I should put the check to a better place which all lints get benefit from the check.
## Change
Since visit_nested_body in late.rs is the starting point of late lint for a nested body, I moved the error check to the function.
I also rename one ui test case which I introduced in the last PR. I think the new name describes what the test wants to check more.
This PR fixes rust-lang/rust#138361 .
Note that we need to use actually_rustdoc to call typeck_body() in visit_nested_body. Otherwise rustdoc returns an error. However, as its comment describes we shouldn't use actually_rustdoc if there is an alternative solution. So far I only come up with using actually_rustdoc (this change), or checking tainted_by_error in each check_xxx functions (e.g., check on check_pat in rust-lang/rust#138679 , and on check_expr for rust-lang/rust#138361 ).
2026-09-22 13:23:34 +02:00
..
2026-08-16 10:01:47 +00:00
2026-06-09 13:16:26 +02:00
2025-10-13 15:20:49 +02:00
2026-08-04 18:44:28 +00:00
2026-08-24 10:03:03 +00:00
2026-07-13 10:54:53 +02:00
2025-06-11 15:30:15 +01:00
2026-07-13 10:54:53 +02:00
2025-05-09 12:19:09 +02:00
2026-07-15 11:50:42 -04:00
2025-12-25 12:27:17 +00:00
2025-10-13 15:20:49 +02:00
2026-07-13 10:54:53 +02:00
2024-12-08 14:17:25 +01:00
2024-12-08 14:17:25 +01:00
2025-04-10 09:56:37 +02:00
2025-12-17 20:47:47 +01:00
2025-12-17 20:47:47 +01:00
2025-12-17 20:47:47 +01:00
2025-12-25 12:27:17 +00:00
2025-09-26 15:37:19 -07:00
2025-09-27 14:41:09 +02:00
2026-07-13 10:54:53 +02:00
2024-12-08 14:17:25 +01:00
2024-11-22 11:12:15 -08:00
2025-09-29 11:04:50 +10:00
2025-03-11 12:05:02 +00:00
2026-08-16 18:00:38 +00:00
2025-04-10 09:56:37 +02:00
2026-08-03 21:50:31 +01:00
2024-12-08 14:17:25 +01:00
2024-12-15 17:27:52 +01:00
2026-07-13 10:54:53 +02:00
2025-03-11 12:05:02 +00:00
2025-03-03 23:09:42 +00:00
2024-12-12 22:55:31 +01:00
2025-10-13 15:20:49 +02:00
2025-01-04 14:38:06 +01:00
2025-01-04 14:38:06 +01:00
2025-01-04 14:38:06 +01:00
2025-01-12 10:11:29 +01:00
2025-02-09 10:40:18 +01:00
2025-02-09 10:40:18 +01:00
2025-02-09 10:40:18 +01:00
2025-03-08 20:13:07 +01:00
2025-03-08 20:13:07 +01:00
2025-03-08 20:13:07 +01:00
2025-03-08 20:13:07 +01:00
2025-03-08 20:13:07 +01:00
2025-03-11 12:05:02 +00:00
2026-08-14 09:04:25 +00:00
2026-04-09 11:36:46 +02:00
2025-03-08 20:13:07 +01:00
2026-07-20 18:24:17 +02:00
2025-05-01 17:04:37 +02:00
2026-08-24 10:03:03 +00:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-12-25 12:27:17 +00:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2026-09-07 08:56:08 +00:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2026-08-14 09:04:25 +00:00
2026-08-16 18:00:38 +00:00
2026-08-24 10:03:03 +00:00
2026-08-16 18:00:38 +00:00
2026-08-24 10:03:03 +00:00
2026-08-16 18:00:38 +00:00
2026-09-07 08:56:08 +00:00
2025-10-23 22:15:34 +00:00
2026-09-07 08:56:08 +00:00
2025-10-23 22:15:34 +00:00
2026-03-09 18:51:25 -04:00
2026-06-27 08:51:24 +00:00
2026-08-14 09:04:25 +00:00
2026-08-16 18:00:38 +00:00
2026-08-16 18:00:38 +00:00
2026-06-27 08:51:24 +00:00
2026-08-14 09:04:25 +00:00
2026-08-14 09:04:25 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-08-14 09:04:25 +00:00
2026-06-27 08:51:24 +00:00
2026-09-07 08:56:08 +00:00
2026-06-27 08:51:24 +00:00
2026-08-24 10:03:03 +00:00
2026-06-28 09:39:21 +00:00
2026-09-11 17:08:12 +02:00
2026-07-20 18:24:17 +02:00
2026-06-28 09:39:21 +00:00
2026-03-09 18:51:25 -04:00
2026-06-28 09:39:21 +00:00
2026-06-28 09:39:21 +00:00
2026-06-28 09:39:21 +00:00
2026-07-20 18:24:17 +02:00
2026-06-28 09:39:21 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-08-16 18:00:38 +00:00
2026-08-24 10:03:03 +00:00
2026-08-24 10:03:03 +00:00
2026-08-24 10:03:03 +00:00
2026-08-16 10:01:47 +00:00
2026-08-16 10:01:47 +00:00
2026-09-07 08:56:08 +00:00
2026-08-16 10:01:47 +00:00
2026-08-16 10:01:47 +00:00
2026-09-07 08:56:08 +00:00
2026-06-27 08:51:24 +00:00
2026-08-16 10:01:47 +00:00
2026-08-16 10:01:47 +00:00
2026-08-16 10:01:47 +00:00
2026-08-24 10:03:03 +00:00
2026-08-24 10:03:03 +00:00
2026-06-27 08:51:24 +00:00
2026-09-20 22:06:40 +00:00
2026-09-20 22:06:40 +00:00
2026-09-07 08:56:08 +00:00
2026-05-02 21:07:24 +08:00
2026-08-24 10:03:03 +00:00
2026-09-07 08:56:08 +00:00
2026-09-07 08:56:08 +00:00
2026-09-07 08:56:08 +00:00
2026-09-07 08:56:08 +00:00
2026-09-07 08:56:08 +00:00
2026-09-07 08:56:08 +00:00
2025-02-19 12:03:40 -08:00
2025-12-17 21:25:19 +02:00