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-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-03-26 09:26:23 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-04 18:57:19 +02:00
2024-06-04 18:57:19 +02:00
2024-06-04 18:57:19 +02:00
2024-06-05 22:25:42 +01:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 12:34:47 +00:00
2024-05-23 15:48:06 +00:00
2024-06-11 08:08:25 +00:00
2024-06-11 08:08:25 +00:00
2024-06-11 08:08:25 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-05-18 18:12:18 +02:00
2024-03-28 06:00:26 +00:00
2024-03-28 06:00:26 +00:00
2024-06-18 15:41:27 +00:00
2024-06-18 15:41:27 +00:00
2024-06-18 15:41:27 +00:00
2024-06-18 15:41:27 +00:00
2024-06-18 15:41:27 +00:00
2024-06-18 15:41:27 +00:00
2024-05-18 18:12:18 +02:00
2024-03-28 06:00:26 +00:00
2024-03-28 06:08:43 +00:00
2024-03-28 06:00:25 +00:00
2024-03-28 06:00:25 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-03-28 06:00:26 +00:00
2024-03-28 06:00:26 +00:00
2024-03-28 06:00:26 +00:00
2024-06-12 08:53:59 +00:00
2024-06-26 16:01:45 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-27 15:19:08 -04:00
2024-06-26 16:01:45 +00:00
2024-06-26 16:01:45 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-05-20 20:30:44 +02:00
2024-05-29 22:26:54 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 19:03:37 -04:00
2024-06-12 19:10:02 -04:00
2024-04-24 08:05:29 +00:00
2024-04-24 08:05:29 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-19 08:29:17 +00:00
2024-06-19 08:29:17 +00:00
2024-03-28 06:00:26 +00:00
2024-03-28 06:00:26 +00:00
2024-06-13 10:41:53 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:53 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-06-13 10:41:52 +00:00
2024-03-28 06:00:26 +00:00
2024-03-28 06:00:26 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 12:34:47 +00:00
2024-06-11 08:19:19 +00:00
2024-06-11 08:19:19 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-11 08:19:19 +00:00
2024-06-11 08:19:19 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-11 08:08:25 +00:00
2024-06-12 08:53:59 +00:00
2024-03-26 09:26:23 +00:00
2024-03-26 09:26:23 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-11 08:08:25 +00:00
2024-06-11 08:08:25 +00:00
2024-06-11 08:08:25 +00:00
2024-06-11 08:08:25 +00:00
2024-05-11 12:59:06 +02:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2024-04-08 15:08:06 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-06-12 08:53:59 +00:00
2024-04-17 22:29:59 -04:00
2024-04-17 22:29:59 -04:00