Rename ty_error_with_guaranteed to ty_error, ty_error to ty_error_misc
This commit is contained in:
@@ -320,7 +320,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::EarlyBinder<Ty<'_>>
|
||||
match self_ty.find_self_aliases() {
|
||||
spans if spans.len() > 0 => {
|
||||
let guar = tcx.sess.emit_err(crate::errors::SelfInImplSelf { span: spans.into(), note: () });
|
||||
tcx.ty_error_with_guaranteed(guar)
|
||||
tcx.ty_error(guar)
|
||||
},
|
||||
_ => icx.to_ty(*self_ty),
|
||||
}
|
||||
@@ -600,10 +600,8 @@ fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: LocalDefId) -> T
|
||||
// ```
|
||||
let tables = self.tcx.typeck(item_def_id);
|
||||
if let Some(guar) = tables.tainted_by_errors {
|
||||
self.found = Some(ty::OpaqueHiddenType {
|
||||
span: DUMMY_SP,
|
||||
ty: self.tcx.ty_error_with_guaranteed(guar),
|
||||
});
|
||||
self.found =
|
||||
Some(ty::OpaqueHiddenType { span: DUMMY_SP, ty: self.tcx.ty_error(guar) });
|
||||
return;
|
||||
}
|
||||
let Some(&typeck_hidden_ty) = tables.concrete_opaque_types.get(&self.def_id) else {
|
||||
@@ -622,7 +620,7 @@ fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: LocalDefId) -> T
|
||||
if let Some(prev) = &mut self.found {
|
||||
if concrete_type.ty != prev.ty && !(concrete_type, prev.ty).references_error() {
|
||||
let guar = prev.report_mismatch(&concrete_type, self.tcx);
|
||||
prev.ty = self.tcx.ty_error_with_guaranteed(guar);
|
||||
prev.ty = self.tcx.ty_error(guar);
|
||||
}
|
||||
} else {
|
||||
self.found = Some(concrete_type);
|
||||
@@ -709,7 +707,7 @@ fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: LocalDefId) -> T
|
||||
_ => "item",
|
||||
},
|
||||
});
|
||||
return tcx.ty_error_with_guaranteed(reported);
|
||||
return tcx.ty_error(reported);
|
||||
};
|
||||
|
||||
// Only check against typeck if we didn't already error
|
||||
@@ -821,7 +819,7 @@ fn find_opaque_ty_constraints_for_rpit(
|
||||
// Some error in the
|
||||
// owner fn prevented us from populating
|
||||
// the `concrete_opaque_types` table.
|
||||
tcx.ty_error_with_guaranteed(guar)
|
||||
tcx.ty_error(guar)
|
||||
} else {
|
||||
table.concrete_opaque_types.get(&def_id).map(|ty| ty.ty).unwrap_or_else(|| {
|
||||
// We failed to resolve the opaque type or it
|
||||
|
||||
Reference in New Issue
Block a user