summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs')
-rw-r--r--compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs
index 0b3bc1ce6..f903f7a49 100644
--- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs
+++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs
@@ -13,7 +13,7 @@ use rustc_hir::def::Namespace;
use rustc_hir::def_id::DefId;
use rustc_middle::ty::error::ExpectedFound;
use rustc_middle::ty::print::{FmtPrinter, Print, RegionHighlightMode};
-use rustc_middle::ty::subst::SubstsRef;
+use rustc_middle::ty::GenericArgsRef;
use rustc_middle::ty::{self, RePlaceholder, Region, TyCtxt};
use std::fmt;
@@ -196,11 +196,11 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
sup_placeholder: Option<Region<'tcx>>,
value_pairs: &ValuePairs<'tcx>,
) -> Option<DiagnosticBuilder<'tcx, ErrorGuaranteed>> {
- let (expected_substs, found_substs, trait_def_id) = match value_pairs {
+ let (expected_args, found_args, trait_def_id) = match value_pairs {
ValuePairs::TraitRefs(ExpectedFound { expected, found })
if expected.def_id == found.def_id =>
{
- (expected.substs, found.substs, expected.def_id)
+ (expected.args, found.args, expected.def_id)
}
ValuePairs::PolyTraitRefs(ExpectedFound { expected, found })
if expected.def_id() == found.def_id() =>
@@ -208,7 +208,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
// It's possible that the placeholders come from a binder
// outside of this value pair. Use `no_bound_vars` as a
// simple heuristic for that.
- (expected.no_bound_vars()?.substs, found.no_bound_vars()?.substs, expected.def_id())
+ (expected.no_bound_vars()?.args, found.no_bound_vars()?.args, expected.def_id())
}
_ => return None,
};
@@ -219,8 +219,8 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
sub_placeholder,
sup_placeholder,
trait_def_id,
- expected_substs,
- found_substs,
+ expected_args,
+ found_args,
))
}
@@ -241,8 +241,8 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
sub_placeholder: Option<Region<'tcx>>,
sup_placeholder: Option<Region<'tcx>>,
trait_def_id: DefId,
- expected_substs: SubstsRef<'tcx>,
- actual_substs: SubstsRef<'tcx>,
+ expected_args: GenericArgsRef<'tcx>,
+ actual_args: GenericArgsRef<'tcx>,
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
let span = cause.span();
@@ -264,12 +264,12 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
let expected_trait_ref = self.cx.resolve_vars_if_possible(ty::TraitRef::new(
self.cx.tcx,
trait_def_id,
- expected_substs,
+ expected_args,
));
let actual_trait_ref = self.cx.resolve_vars_if_possible(ty::TraitRef::new(
self.cx.tcx,
trait_def_id,
- actual_substs,
+ actual_args,
));
// Search the expected and actual trait references to see (a)
@@ -413,9 +413,9 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
if self_ty.value.is_closure() && self.tcx().is_fn_trait(expected_trait_ref.value.def_id)
{
let closure_sig = self_ty.map(|closure| {
- if let ty::Closure(_, substs) = closure.kind() {
+ if let ty::Closure(_, args) = closure.kind() {
self.tcx().signature_unclosure(
- substs.as_closure().sig(),
+ args.as_closure().sig(),
rustc_hir::Unsafety::Normal,
)
} else {