bors
7b21c18fe4
Auto merge of #126996 - oli-obk:do_not_count_errors, r=nnethercote
...
Automatically taint InferCtxt when errors are emitted
r? `@nnethercote`
Basically `InferCtxt::dcx` now returns a `DiagCtxt` that refers back to the `Cell<Option<ErrorGuaranteed>>` of the `InferCtxt` and thus when invoking `Diag::emit`, and the diagnostic is an error, we taint the `InferCtxt` directly.
That change on its own has no effect at all, because `InferCtxt` already tracks whether errors have been emitted by recording the global error count when it gets opened, and checking at the end whether the count changed. So I removed that error count check, which had a bit of fallout that I immediately fixed by invoking `InferCtxt::dcx` instead of `TyCtxt::dcx` in a bunch of places.
The remaining new errors are because an error was reported in another query, and never bubbled up. I think they are minor enough for this to be ok, and sometimes it actually improves diagnostics, by not silencing useful diagnostics anymore.
fixes #126485 (cc `@olafes)`
There are more improvements we can do (like tainting in hir ty lowering), but I would rather do that in follow up PRs, because it requires some refactorings.
2024-07-01 06:35:58 +00:00
..
2024-03-21 00:03:59 +00:00
2024-03-11 19:42:04 +00:00
2024-04-24 13:12:33 +01:00
2024-02-16 20:02:50 +00:00
2024-03-21 00:03:59 +00:00
2024-03-21 00:03:59 +00:00
2024-03-21 00:03:59 +00:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2024-03-21 00:03:59 +00:00
2024-03-21 00:03:59 +00:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-05 23:20:09 +08:00
2024-04-21 22:00:38 +02:00
2024-04-21 22:00:38 +02:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-04-24 13:12:33 +01:00
2024-04-24 13:12:33 +01:00
2024-03-24 10:09:56 +01:00
2024-03-24 10:09:56 +01:00
2024-02-16 20:02:50 +00:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2023-11-30 20:59:51 +01:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-05-24 13:16:06 -04:00
2024-05-24 13:16:06 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-05 22:25:42 +01:00
2024-06-05 22:25:42 +01:00
2024-06-05 22:25:42 +01:00
2024-06-05 22:25:42 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-28 10:23:11 +02:00
2024-04-28 10:23:11 +02:00
2024-03-24 09:34:11 +01:00
2024-04-28 10:23:10 +02:00
2023-11-30 20:59:51 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-22 11:35:31 +01:00
2024-03-22 11:35:31 +01:00
2024-03-22 08:45:03 +01:00
2024-03-22 08:45:03 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-24 13:12:33 +01:00
2024-06-19 14:58:29 +00:00
2024-06-19 14:58:29 +00:00
2024-06-19 04:41:56 +00:00
2023-01-11 19:31:33 +00:00
2023-11-30 20:59:51 +01:00
2024-02-16 20:02:50 +00:00
2023-02-21 05:21:07 +00:00
2023-11-30 20:59:51 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-05-05 21:42:54 +01:00
2023-11-30 20:59:51 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-09 21:08:16 +00:00
2024-01-09 21:08:16 +00:00
2024-01-09 21:08:16 +00:00
2024-01-09 21:08:16 +00:00
2023-11-24 19:15:52 +01:00
2024-03-20 17:30:19 +00:00
2024-03-20 17:30:19 +00:00
2024-02-16 20:02:50 +00:00
2023-01-16 20:21:29 +00:00
2023-03-19 23:46:09 +00:00
2023-11-24 19:15:52 +01:00
2024-03-21 00:03:59 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-03-21 00:03:59 +00:00
2024-03-24 10:16:29 +01:00
2024-03-24 10:16:29 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-06-03 09:49:04 -04:00
2024-06-03 09:49:04 -04:00
2024-06-19 04:41:56 +00:00
2024-06-19 14:58:29 +00:00
2024-02-16 20:02:50 +00:00
2024-01-24 02:53:15 +00:00
2024-06-26 16:01:45 +00:00
2024-06-26 16:01:45 +00:00
2024-03-23 12:32:32 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-05-29 17:06:54 +01:00
2024-05-29 17:06:54 +01:00
2024-02-16 20:02:50 +00:00
2024-02-29 15:27:56 -03:00
2024-03-24 10:01:50 +01:00
2024-03-24 10:01:50 +01:00
2024-06-30 17:08:45 +00:00
2024-06-30 17:08:45 +00:00
2024-04-07 01:20:56 +02:00
2024-04-07 01:20:56 +02:00
2024-02-16 20:02:50 +00:00
2023-05-05 21:42:54 +01:00
2023-11-24 19:15:52 +01:00
2023-01-16 20:21:29 +00:00
2024-02-16 20:02:50 +00:00