about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-09 16:12:18 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-12 18:29:19 +1100
commit30774b00610bb3ab3339931f5eba21574d35a39a (patch)
tree067a458c2717affd469434a53c4bcdf9fa7fe233 /compiler/rustc_interface/src
parentde4d615e6b86f7ef6deacd24610b0678230b8af3 (diff)
downloadrust-30774b00610bb3ab3339931f5eba21574d35a39a.tar.gz
rust-30774b00610bb3ab3339931f5eba21574d35a39a.zip
Remove final unwanted `unchecked_error_guaranteed` calls.
Now that error counts can't go up and down due to stashing/stealing, we
have a nice property:

  (err_count > 0) iff (an ErrorGuaranteed has been produced)

So we can now record `ErrorGuaranteed`s within `DiagCtxt` and use that
in methods like `has_error`, instead of checking that the count is
greater than 0 and calling `unchecked_error_guaranteed` to create the
`ErrorGuaranteed`.

In fact, we can record a `Vec<ErrorGuaranteed>` and use its length to
count the number, instead of maintaining a separate count.
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions