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-11 19:42:04 +00:00
2023-11-24 19:15:52 +01:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00: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
2024-01-24 00:41:45 +01:00
2024-01-24 00:41:45 +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
2023-11-24 19:15:52 +01:00
2024-06-26 16:01:45 +00:00
2024-06-26 16:01:45 +00:00
2023-11-24 19:15:52 +01: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-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-27 14:02:15 +00:00
2023-11-24 19:15:52 +01:00
2024-02-01 16:18:03 +01:00
2024-02-16 20:02:50 +00:00
2024-03-21 00:03:59 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-01 16:18:03 +01:00
2024-02-16 20:02:50 +00: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
2023-11-24 19:15:52 +01:00
2024-02-01 16:18:03 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-01 16:18:03 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-18 16:08:58 +00:00
2024-03-18 16:08:58 +00:00
2024-03-07 06:27:09 +00:00
2024-02-16 20:02:50 +00:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +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-02-07 10:42:01 +08: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
2023-11-24 19:15:52 +01:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-03-06 16:51:17 +05:30
2024-03-21 00:03:59 +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
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-05-28 11:55:20 +00:00
2024-05-28 11:55:20 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:12:19 +00:00
2024-02-14 11:12:19 +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
2023-02-16 15:14:45 +11:00
2023-02-21 05:21:07 +00:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +00:00
2024-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +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-03-18 16:08:58 +00:00
2024-02-16 20:02:50 +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
2023-11-30 20:59:51 +01:00
2024-01-24 02:53:15 +00:00
2023-11-30 20:59:51 +01:00
2023-11-30 20:59:51 +01:00
2024-06-13 20:22:21 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-01-02 14:17:56 +00:00
2024-01-02 14:17:56 +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
2023-01-19 20:20:58 +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
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-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2024-02-16 20:02:50 +00:00
2024-06-30 17:08:45 +00:00
2024-06-30 17:08:45 +00:00
2024-02-16 20:02:50 +00:00
2023-05-05 21:42:54 +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-08 08:10:43 +00:00
2024-03-18 16:08:58 +00:00
2023-11-24 19:15:52 +01: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-02-16 20:02:50 +00:00
2023-06-01 18:21:42 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-06-01 18:21:42 +00:00
2023-06-01 18:21:42 +00:00
2024-02-19 22:11:13 +00:00
2024-02-19 22:11:13 +00:00
2024-02-16 20:02:50 +00:00
2024-05-29 17:06:54 +01:00