rename ErrorReported -> ErrorGuaranteed

This commit is contained in:
mark 2022-01-23 12:34:26 -06:00
parent c42d846add
commit e489a94dee
112 changed files with 580 additions and 559 deletions

View file

@ -142,7 +142,7 @@ rustc_queries! {
separate_provide_extern
}
query analysis(key: ()) -> Result<(), ErrorReported> {
query analysis(key: ()) -> Result<(), ErrorGuaranteed> {
eval_always
desc { "running analysis passes on this crate" }
}
@ -312,7 +312,7 @@ rustc_queries! {
/// Try to build an abstract representation of the given constant.
query thir_abstract_const(
key: DefId
) -> Result<Option<&'tcx [thir::abstract_const::Node<'tcx>]>, ErrorReported> {
) -> Result<Option<&'tcx [thir::abstract_const::Node<'tcx>]>, ErrorGuaranteed> {
desc {
|tcx| "building an abstract representation for {}", tcx.def_path_str(key),
}
@ -321,7 +321,7 @@ rustc_queries! {
/// Try to build an abstract representation of the given constant.
query thir_abstract_const_of_const_arg(
key: (LocalDefId, DefId)
) -> Result<Option<&'tcx [thir::abstract_const::Node<'tcx>]>, ErrorReported> {
) -> Result<Option<&'tcx [thir::abstract_const::Node<'tcx>]>, ErrorGuaranteed> {
desc {
|tcx|
"building an abstract representation for the const argument {}",
@ -1107,7 +1107,7 @@ rustc_queries! {
query codegen_fulfill_obligation(
key: (ty::ParamEnv<'tcx>, ty::PolyTraitRef<'tcx>)
) -> Result<&'tcx ImplSource<'tcx, ()>, ErrorReported> {
) -> Result<&'tcx ImplSource<'tcx, ()>, ErrorGuaranteed> {
cache_on_disk_if { true }
desc { |tcx|
"checking if `{}` fulfills its obligations",
@ -1890,20 +1890,20 @@ rustc_queries! {
/// * `Ok(Some(instance))` on success
/// * `Ok(None)` when the `SubstsRef` are still too generic,
/// and therefore don't allow finding the final `Instance`
/// * `Err(ErrorReported)` when the `Instance` resolution process
/// * `Err(ErrorGuaranteed)` when the `Instance` resolution process
/// couldn't complete due to errors elsewhere - this is distinct
/// from `Ok(None)` to avoid misleading diagnostics when an error
/// has already been/will be emitted, for the original cause
query resolve_instance(
key: ty::ParamEnvAnd<'tcx, (DefId, SubstsRef<'tcx>)>
) -> Result<Option<ty::Instance<'tcx>>, ErrorReported> {
) -> Result<Option<ty::Instance<'tcx>>, ErrorGuaranteed> {
desc { "resolving instance `{}`", ty::Instance::new(key.value.0, key.value.1) }
remap_env_constness
}
query resolve_instance_of_const_arg(
key: ty::ParamEnvAnd<'tcx, (LocalDefId, DefId, SubstsRef<'tcx>)>
) -> Result<Option<ty::Instance<'tcx>>, ErrorReported> {
) -> Result<Option<ty::Instance<'tcx>>, ErrorGuaranteed> {
desc {
"resolving instance of the const argument `{}`",
ty::Instance::new(key.value.0.to_def_id(), key.value.2),