visit_x_unambig
This commit is contained in:
parent
6833c27090
commit
2bdeff2fb8
27 changed files with 92 additions and 92 deletions
|
@ -48,7 +48,7 @@ fn find_component_for_bound_region<'tcx>(
|
|||
region_def_id: DefId,
|
||||
) -> Option<&'tcx hir::Ty<'tcx>> {
|
||||
FindNestedTypeVisitor { tcx, region_def_id, current_index: ty::INNERMOST }
|
||||
.visit_unambig_ty(arg)
|
||||
.visit_ty_unambig(arg)
|
||||
.break_value()
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
for matching_def_id in v.0 {
|
||||
let mut hir_v =
|
||||
super::static_impl_trait::HirTraitObjectVisitor(&mut traits, matching_def_id);
|
||||
hir_v.visit_unambig_ty(impl_self_ty);
|
||||
hir_v.visit_ty_unambig(impl_self_ty);
|
||||
}
|
||||
|
||||
if traits.is_empty() {
|
||||
|
|
|
@ -153,7 +153,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
let mut add_label = true;
|
||||
if let hir::FnRetTy::Return(ty) = fn_decl.output {
|
||||
let mut v = StaticLifetimeVisitor(vec![], tcx.hir());
|
||||
v.visit_unambig_ty(ty);
|
||||
v.visit_ty_unambig(ty);
|
||||
if !v.0.is_empty() {
|
||||
span = v.0.clone().into();
|
||||
spans = v.0;
|
||||
|
@ -500,7 +500,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
// In that case, only the first one will get suggestions.
|
||||
let mut traits = vec![];
|
||||
let mut hir_v = HirTraitObjectVisitor(&mut traits, *did);
|
||||
hir_v.visit_unambig_ty(self_ty);
|
||||
hir_v.visit_ty_unambig(self_ty);
|
||||
!traits.is_empty()
|
||||
})
|
||||
{
|
||||
|
@ -560,7 +560,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
for found_did in found_dids {
|
||||
let mut traits = vec![];
|
||||
let mut hir_v = HirTraitObjectVisitor(&mut traits, *found_did);
|
||||
hir_v.visit_unambig_ty(self_ty);
|
||||
hir_v.visit_ty_unambig(self_ty);
|
||||
for &span in &traits {
|
||||
let subdiag = DynTraitConstraintSuggestion { span, ident };
|
||||
subdiag.add_to_diag(err);
|
||||
|
|
|
@ -178,7 +178,7 @@ pub fn suggest_restriction<'tcx, G: EmissionGuarantee>(
|
|||
let mut ty_spans = vec![];
|
||||
for input in fn_sig.decl.inputs {
|
||||
ReplaceImplTraitVisitor { ty_spans: &mut ty_spans, param_did: param.def_id }
|
||||
.visit_unambig_ty(input);
|
||||
.visit_ty_unambig(input);
|
||||
}
|
||||
// The type param `T: Trait` we will suggest to introduce.
|
||||
let type_param = format!("{type_param_name}: {bound_str}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue