Skip to content

Commit dac96d4

Browse files
committed
Fix use of bare trait objects everywhere
1 parent 36f1f04 commit dac96d4

File tree

22 files changed

+88
-74
lines changed

22 files changed

+88
-74
lines changed

compiler/rustc_trait_selection/src/infer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl<'tcx> InferCtxtBuilderExt<'tcx> for InferCtxtBuilder<'tcx> {
124124
DUMMY_SP,
125125
canonical_key,
126126
|ref infcx, key, canonical_inference_vars| {
127-
let mut fulfill_cx = TraitEngine::new(infcx.tcx);
127+
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(infcx.tcx);
128128
let value = operation(infcx, &mut *fulfill_cx, key)?;
129129
infcx.make_canonicalized_query_response(
130130
canonical_inference_vars,

compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn scrape_region_constraints<'tcx, R>(
6262
infcx: &InferCtxt<'_, 'tcx>,
6363
op: impl FnOnce() -> Fallible<InferOk<'tcx, R>>,
6464
) -> Fallible<(R, Option<Rc<QueryRegionConstraints<'tcx>>>)> {
65-
let mut fulfill_cx = TraitEngine::new(infcx.tcx);
65+
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(infcx.tcx);
6666
let dummy_body_id = ObligationCause::dummy().body_id;
6767

6868
// During NLL, we expect that nobody will register region

compiler/rustc_traits/src/dropck_outlives.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn dropck_outlives<'tcx>(
7575
// Set used to detect infinite recursion.
7676
let mut ty_set = FxHashSet::default();
7777

78-
let mut fulfill_cx = TraitEngine::new(infcx.tcx);
78+
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(infcx.tcx);
7979

8080
let cause = ObligationCause::dummy();
8181
let mut constraints = DtorckConstraint::empty();

compiler/rustc_typeck/src/check/coercion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
15541554
if let hir::FnRetTy::Return(ty) = fn_output {
15551555
// Get the return type.
15561556
if let hir::TyKind::OpaqueDef(..) = ty.kind {
1557-
let ty = AstConv::ast_ty_to_ty(fcx, ty);
1557+
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(fcx, ty);
15581558
// Get the `impl Trait`'s `DefId`.
15591559
if let ty::Opaque(def_id, _) = ty.kind() {
15601560
let hir_id = fcx.tcx.hir().local_def_id_to_hir_id(def_id.expect_local());
@@ -1616,7 +1616,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
16161616
fn is_return_ty_unsized(&self, fcx: &FnCtxt<'a, 'tcx>, blk_id: hir::HirId) -> bool {
16171617
if let Some((fn_decl, _)) = fcx.get_fn_decl(blk_id) {
16181618
if let hir::FnRetTy::Return(ty) = fn_decl.output {
1619-
let ty = AstConv::ast_ty_to_ty(fcx, ty);
1619+
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(fcx, ty);
16201620
if let ty::Dynamic(..) = ty.kind() {
16211621
return true;
16221622
}

compiler/rustc_typeck/src/check/dropck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
7777
tcx.infer_ctxt().enter(|ref infcx| {
7878
let impl_param_env = tcx.param_env(self_type_did);
7979
let tcx = infcx.tcx;
80-
let mut fulfillment_cx = TraitEngine::new(tcx);
80+
let mut fulfillment_cx = <dyn TraitEngine<'_>>::new(tcx);
8181

8282
let named_type = tcx.type_of(self_type_did);
8383

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
472472
}
473473

474474
pub fn to_ty(&self, ast_t: &hir::Ty<'_>) -> Ty<'tcx> {
475-
let t = AstConv::ast_ty_to_ty(self, ast_t);
475+
let t = <dyn AstConv<'_>>::ast_ty_to_ty(self, ast_t);
476476
self.register_wf_obligation(t.into(), ast_t.span, traits::MiscObligation);
477477
t
478478
}
@@ -854,7 +854,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
854854
// out unconstrained or ambiguous, as we're
855855
// just trying to get hints here.
856856
self.save_and_restore_in_snapshot_flag(|_| {
857-
let mut fulfill = TraitEngine::new(self.tcx);
857+
let mut fulfill = <dyn TraitEngine<'_>>::new(self.tcx);
858858
for obligation in ok.obligations {
859859
fulfill.register_predicate_obligation(self, obligation);
860860
}
@@ -1174,9 +1174,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
11741174

11751175
let path_segs = match res {
11761176
Res::Local(_) | Res::SelfCtor(_) => vec![],
1177-
Res::Def(kind, def_id) => {
1178-
AstConv::def_ids_for_value_path_segments(self, segments, self_ty, kind, def_id)
1179-
}
1177+
Res::Def(kind, def_id) => <dyn AstConv<'_>>::def_ids_for_value_path_segments(
1178+
self, segments, self_ty, kind, def_id,
1179+
),
11801180
_ => bug!("instantiate_value_path on {:?}", res),
11811181
};
11821182

@@ -1219,7 +1219,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
12191219
// errors if type parameters are provided in an inappropriate place.
12201220

12211221
let generic_segs: FxHashSet<_> = path_segs.iter().map(|PathSeg(_, index)| index).collect();
1222-
let generics_has_err = AstConv::prohibit_generics(
1222+
let generics_has_err = <dyn AstConv<'_>>::prohibit_generics(
12231223
self,
12241224
segments.iter().enumerate().filter_map(|(index, seg)| {
12251225
if !generic_segs.contains(&index) || is_alias_variant_ctor {
@@ -1262,7 +1262,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
12621262
if let GenericArgCountResult {
12631263
correct: Err(GenericArgCountMismatch { reported: Some(_), .. }),
12641264
..
1265-
} = AstConv::check_generic_arg_count_for_call(
1265+
} = <dyn AstConv<'_>>::check_generic_arg_count_for_call(
12661266
tcx,
12671267
span,
12681268
def_id,
@@ -1370,7 +1370,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
13701370
) -> subst::GenericArg<'tcx> {
13711371
match (&param.kind, arg) {
13721372
(GenericParamDefKind::Lifetime, GenericArg::Lifetime(lt)) => {
1373-
AstConv::ast_region_to_region(self.fcx, lt, Some(param)).into()
1373+
<dyn AstConv<'_>>::ast_region_to_region(self.fcx, lt, Some(param)).into()
13741374
}
13751375
(GenericParamDefKind::Type { .. }, GenericArg::Type(ty)) => {
13761376
self.fcx.to_ty(ty).into()
@@ -1423,7 +1423,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14231423
}
14241424

14251425
let substs = self_ctor_substs.unwrap_or_else(|| {
1426-
AstConv::create_substs_for_generic_args(
1426+
<dyn AstConv<'_>>::create_substs_for_generic_args(
14271427
tcx,
14281428
def_id,
14291429
&[][..],

compiler/rustc_typeck/src/check/fn_ctxt/checks.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
875875
match *qpath {
876876
QPath::Resolved(ref maybe_qself, ref path) => {
877877
let self_ty = maybe_qself.as_ref().map(|qself| self.to_ty(qself));
878-
let ty = AstConv::res_to_ty(self, self_ty, path, true);
878+
let ty = <dyn AstConv<'_>>::res_to_ty(self, self_ty, path, true);
879879
(path.res, ty)
880880
}
881881
QPath::TypeRelative(ref qself, ref segment) => {
@@ -886,8 +886,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
886886
} else {
887887
Res::Err
888888
};
889-
let result =
890-
AstConv::associated_path_to_ty(self, hir_id, path_span, ty, res, segment, true);
889+
let result = <dyn AstConv<'_>>::associated_path_to_ty(
890+
self, hir_id, path_span, ty, res, segment, true,
891+
);
891892
let ty = result.map(|(ty, _, _)| ty).unwrap_or_else(|_| self.tcx().ty_error());
892893
let result = result.map(|(_, kind, def_id)| (kind, def_id));
893894

@@ -1000,7 +1001,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10001001
// would trigger in `is_send::<T::AssocType>();`
10011002
// from `typeck-default-trait-impl-assoc-type.rs`.
10021003
} else {
1003-
let ty = AstConv::ast_ty_to_ty(self, hir_ty);
1004+
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(self, hir_ty);
10041005
let ty = self.resolve_vars_if_possible(ty);
10051006
if ty == predicate.self_ty() {
10061007
error.obligation.cause.make_mut().span = hir_ty.span;

compiler/rustc_typeck/src/check/fn_ctxt/suggestions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
461461
// are not, the expectation must have been caused by something else.
462462
debug!("suggest_missing_return_type: return type {:?} node {:?}", ty, ty.kind);
463463
let sp = ty.span;
464-
let ty = AstConv::ast_ty_to_ty(self, ty);
464+
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(self, ty);
465465
debug!("suggest_missing_return_type: return type {:?}", ty);
466466
debug!("suggest_missing_return_type: expected type {:?}", ty);
467467
if ty.kind() == expected.kind() {
@@ -486,7 +486,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
486486
}
487487
let found = self.resolve_vars_with_obligations(found);
488488
if let hir::FnRetTy::Return(ty) = fn_decl.output {
489-
let ty = AstConv::ast_ty_to_ty(self, ty);
489+
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(self, ty);
490490
let ty = self.tcx.erase_late_bound_regions(Binder::bind(ty));
491491
let ty = self.normalize_associated_types_in(expr.span, ty);
492492
if self.can_coerce(found, ty) {

compiler/rustc_typeck/src/check/inherited.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl Inherited<'a, 'tcx> {
117117
maybe_typeck_results: infcx.in_progress_typeck_results,
118118
},
119119
infcx,
120-
fulfillment_cx: RefCell::new(TraitEngine::new(tcx)),
120+
fulfillment_cx: RefCell::new(<dyn TraitEngine<'_>>::new(tcx)),
121121
locals: RefCell::new(Default::default()),
122122
deferred_sized_obligations: RefCell::new(Vec::new()),
123123
deferred_call_resolutions: RefCell::new(Default::default()),

compiler/rustc_typeck/src/check/method/confirm.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
314314
// variables.
315315
let generics = self.tcx.generics_of(pick.item.def_id);
316316

317-
let arg_count_correct = AstConv::check_generic_arg_count_for_call(
317+
let arg_count_correct = <dyn AstConv<'_>>::check_generic_arg_count_for_call(
318318
self.tcx,
319319
self.span,
320320
pick.item.def_id,
@@ -352,7 +352,8 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
352352
) -> subst::GenericArg<'tcx> {
353353
match (&param.kind, arg) {
354354
(GenericParamDefKind::Lifetime, GenericArg::Lifetime(lt)) => {
355-
AstConv::ast_region_to_region(self.cfcx.fcx, lt, Some(param)).into()
355+
<dyn AstConv<'_>>::ast_region_to_region(self.cfcx.fcx, lt, Some(param))
356+
.into()
356357
}
357358
(GenericParamDefKind::Type { .. }, GenericArg::Type(ty)) => {
358359
self.cfcx.to_ty(ty).into()
@@ -373,7 +374,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
373374
self.cfcx.var_for_def(self.cfcx.span, param)
374375
}
375376
}
376-
AstConv::create_substs_for_generic_args(
377+
<dyn AstConv<'_>>::create_substs_for_generic_args(
377378
self.tcx,
378379
pick.item.def_id,
379380
parent_substs,

compiler/rustc_typeck/src/check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ fn typeck_with_fallback<'tcx>(
495495
let fcx = if let (Some(header), Some(decl)) = (fn_header, fn_decl) {
496496
let fn_sig = if crate::collect::get_infer_ret_ty(&decl.output).is_some() {
497497
let fcx = FnCtxt::new(&inh, param_env, body.value.hir_id);
498-
AstConv::ty_of_fn(
498+
<dyn AstConv<'_>>::ty_of_fn(
499499
&fcx,
500500
header.unsafety,
501501
header.abi,
@@ -527,7 +527,7 @@ fn typeck_with_fallback<'tcx>(
527527
let fcx = FnCtxt::new(&inh, param_env, body.value.hir_id);
528528
let expected_type = body_ty
529529
.and_then(|ty| match ty.kind {
530-
hir::TyKind::Infer => Some(AstConv::ast_ty_to_ty(&fcx, ty)),
530+
hir::TyKind::Infer => Some(<dyn AstConv<'_>>::ast_ty_to_ty(&fcx, ty)),
531531
_ => None,
532532
})
533533
.unwrap_or_else(|| match tcx.hir().get(id) {

compiler/rustc_typeck/src/coherence/builtin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
246246
))
247247
.emit();
248248
} else {
249-
let mut fulfill_cx = TraitEngine::new(infcx.tcx);
249+
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(infcx.tcx);
250250

251251
for field in coerced_fields {
252252
let predicate = predicate_for_trait_def(
@@ -506,7 +506,7 @@ pub fn coerce_unsized_info(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUnsizedI
506506
}
507507
};
508508

509-
let mut fulfill_cx = TraitEngine::new(infcx.tcx);
509+
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(infcx.tcx);
510510

511511
// Register an obligation for `A: Trait<B>`.
512512
let cause = traits::ObligationCause::misc(span, impl_hir_id);

compiler/rustc_typeck/src/collect.rs

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ impl ItemCtxt<'tcx> {
310310
}
311311

312312
pub fn to_ty(&self, ast_ty: &hir::Ty<'_>) -> Ty<'tcx> {
313-
AstConv::ast_ty_to_ty(self, ast_ty)
313+
<dyn AstConv<'_>>::ast_ty_to_ty(self, ast_ty)
314314
}
315315

316316
pub fn hir_id(&self) -> hir::HirId {
@@ -1096,7 +1096,7 @@ fn super_predicates_that_define_assoc_type(
10961096
// Convert the bounds that follow the colon, e.g., `Bar + Zed` in `trait Foo: Bar + Zed`.
10971097
let self_param_ty = tcx.types.self_param;
10981098
let superbounds1 = if let Some(assoc_name) = assoc_name {
1099-
AstConv::compute_bounds_that_match_assoc_type(
1099+
<dyn AstConv<'_>>::compute_bounds_that_match_assoc_type(
11001100
&icx,
11011101
self_param_ty,
11021102
&bounds,
@@ -1105,7 +1105,13 @@ fn super_predicates_that_define_assoc_type(
11051105
assoc_name,
11061106
)
11071107
} else {
1108-
AstConv::compute_bounds(&icx, self_param_ty, &bounds, SizedByDefault::No, item.span)
1108+
<dyn AstConv<'_>>::compute_bounds(
1109+
&icx,
1110+
self_param_ty,
1111+
&bounds,
1112+
SizedByDefault::No,
1113+
item.span,
1114+
)
11091115
};
11101116

11111117
let superbounds1 = superbounds1.predicates(tcx, self_param_ty);
@@ -1689,7 +1695,7 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::PolyFnSig<'_> {
16891695

16901696
ty::Binder::bind(fn_sig)
16911697
}
1692-
None => AstConv::ty_of_fn(
1698+
None => <dyn AstConv<'_>>::ty_of_fn(
16931699
&icx,
16941700
sig.header.unsafety,
16951701
sig.header.abi,
@@ -1706,7 +1712,7 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::PolyFnSig<'_> {
17061712
ident,
17071713
generics,
17081714
..
1709-
}) => AstConv::ty_of_fn(
1715+
}) => <dyn AstConv<'_>>::ty_of_fn(
17101716
&icx,
17111717
header.unsafety,
17121718
header.abi,
@@ -1767,7 +1773,7 @@ fn impl_trait_ref(tcx: TyCtxt<'_>, def_id: DefId) -> Option<ty::TraitRef<'_>> {
17671773
match tcx.hir().expect_item(hir_id).kind {
17681774
hir::ItemKind::Impl(ref impl_) => impl_.of_trait.as_ref().map(|ast_trait_ref| {
17691775
let selfty = tcx.type_of(def_id);
1770-
AstConv::instantiate_mono_trait_ref(&icx, ast_trait_ref, selfty)
1776+
<dyn AstConv<'_>>::instantiate_mono_trait_ref(&icx, ast_trait_ref, selfty)
17711777
}),
17721778
_ => bug!(),
17731779
}
@@ -2018,7 +2024,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
20182024
GenericParamKind::Lifetime { .. } => {
20192025
param.bounds.iter().for_each(|bound| match bound {
20202026
hir::GenericBound::Outlives(lt) => {
2021-
let bound = AstConv::ast_region_to_region(&icx, &lt, None);
2027+
let bound = <dyn AstConv<'_>>::ast_region_to_region(&icx, &lt, None);
20222028
let outlives = ty::Binder::bind(ty::OutlivesPredicate(region, bound));
20232029
predicates.insert((outlives.to_predicate(tcx), lt.span));
20242030
}
@@ -2041,8 +2047,13 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
20412047
index += 1;
20422048

20432049
let sized = SizedByDefault::Yes;
2044-
let bounds =
2045-
AstConv::compute_bounds(&icx, param_ty, &param.bounds, sized, param.span);
2050+
let bounds = <dyn AstConv<'_>>::compute_bounds(
2051+
&icx,
2052+
param_ty,
2053+
&param.bounds,
2054+
sized,
2055+
param.span,
2056+
);
20462057
predicates.extend(bounds.predicates(tcx, param_ty));
20472058
}
20482059
GenericParamKind::Const { .. } => {
@@ -2091,7 +2102,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
20912102
};
20922103

20932104
let mut bounds = Bounds::default();
2094-
let _ = AstConv::instantiate_poly_trait_ref(
2105+
let _ = <dyn AstConv<'_>>::instantiate_poly_trait_ref(
20952106
&icx,
20962107
&poly_trait_ref,
20972108
constness,
@@ -2103,7 +2114,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
21032114

21042115
&hir::GenericBound::LangItemTrait(lang_item, span, hir_id, args) => {
21052116
let mut bounds = Bounds::default();
2106-
AstConv::instantiate_lang_item_trait_ref(
2117+
<dyn AstConv<'_>>::instantiate_lang_item_trait_ref(
21072118
&icx,
21082119
lang_item,
21092120
span,
@@ -2116,7 +2127,8 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
21162127
}
21172128

21182129
hir::GenericBound::Outlives(lifetime) => {
2119-
let region = AstConv::ast_region_to_region(&icx, lifetime, None);
2130+
let region =
2131+
<dyn AstConv<'_>>::ast_region_to_region(&icx, lifetime, None);
21202132
predicates.insert((
21212133
ty::Binder::bind(ty::PredicateKind::TypeOutlives(
21222134
ty::OutlivesPredicate(ty, region),
@@ -2130,11 +2142,11 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
21302142
}
21312143

21322144
hir::WherePredicate::RegionPredicate(region_pred) => {
2133-
let r1 = AstConv::ast_region_to_region(&icx, &region_pred.lifetime, None);
2145+
let r1 = <dyn AstConv<'_>>::ast_region_to_region(&icx, &region_pred.lifetime, None);
21342146
predicates.extend(region_pred.bounds.iter().map(|bound| {
21352147
let (r2, span) = match bound {
21362148
hir::GenericBound::Outlives(lt) => {
2137-
(AstConv::ast_region_to_region(&icx, lt, None), lt.span)
2149+
(<dyn AstConv<'_>>::ast_region_to_region(&icx, lt, None), lt.span)
21382150
}
21392151
_ => bug!(),
21402152
};
@@ -2377,7 +2389,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>(
23772389
} else {
23782390
hir::Unsafety::Unsafe
23792391
};
2380-
let fty = AstConv::ty_of_fn(
2392+
let fty = <dyn AstConv<'_>>::ty_of_fn(
23812393
&ItemCtxt::new(tcx, def_id),
23822394
unsafety,
23832395
abi,

compiler/rustc_typeck/src/collect/item_bounds.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn associated_type_bounds<'tcx>(
2525
InternalSubsts::identity_for_item(tcx, assoc_item_def_id),
2626
);
2727

28-
let bounds = AstConv::compute_bounds(
28+
let bounds = <dyn AstConv<'_>>::compute_bounds(
2929
&ItemCtxt::new(tcx, assoc_item_def_id),
3030
item_ty,
3131
&bounds,
@@ -66,7 +66,7 @@ fn opaque_type_bounds<'tcx>(
6666
let item_ty =
6767
tcx.mk_opaque(opaque_def_id, InternalSubsts::identity_for_item(tcx, opaque_def_id));
6868

69-
let bounds = AstConv::compute_bounds(
69+
let bounds = <dyn AstConv<'_>>::compute_bounds(
7070
&ItemCtxt::new(tcx, opaque_def_id),
7171
item_ty,
7272
&bounds,

0 commit comments

Comments
 (0)