1
Fork 0

Auto merge of #108369 - compiler-errors:ty-error-more, r=BoxyUwU

Use `tcx.ty_error_with_guaranteed` in more places, rename variants

1. Use `ty_error_with_guaranteed` more so we don't delay so many span bugs
2. Rename `ty_error_with_guaranteed` to `ty_error`, `ty_error` to `ty_error_misc`. This is to incentivize using the former over the latter in cases where we already are witness to a `ErrorGuaranteed` token.

Second commit is just name replacement, so the first commit can be reviewed on its own with more scrutiny.
This commit is contained in:
bors 2023-02-23 09:20:10 +00:00
commit 07c993eba8
33 changed files with 371 additions and 310 deletions

View file

@ -639,7 +639,7 @@ fn construct_error(
let hir_id = tcx.hir().local_def_id_to_hir_id(def);
let generator_kind = tcx.generator_kind(def);
let ty = tcx.ty_error();
let ty = tcx.ty_error(err);
let num_params = match body_owner_kind {
hir::BodyOwnerKind::Fn => tcx.fn_sig(def).skip_binder().inputs().skip_binder().len(),
hir::BodyOwnerKind::Closure => {