Skip to content

Commit 5cf6edb

Browse files
committed
Fix dyn trait warning
1 parent d563a63 commit 5cf6edb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_mir/src/borrow_check/diagnostics/bound_region_errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ impl TypeOpInfo<'tcx> for PredicateQuery<'tcx> {
208208
error_region: Option<ty::Region<'tcx>>,
209209
) -> Option<DiagnosticBuilder<'tcx>> {
210210
tcx.infer_ctxt().enter_with_canonical(span, &self.canonical_query, |ref infcx, key, _| {
211-
let mut fulfill_cx = TraitEngine::new(tcx);
211+
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(tcx);
212212

213213
let (param_env, prove_predicate) = key.into_parts();
214214
fulfill_cx.register_predicate_obligation(
@@ -252,7 +252,7 @@ where
252252
error_region: Option<ty::Region<'tcx>>,
253253
) -> Option<DiagnosticBuilder<'tcx>> {
254254
tcx.infer_ctxt().enter_with_canonical(span, &self.canonical_query, |ref infcx, key, _| {
255-
let mut fulfill_cx = TraitEngine::new(tcx);
255+
let mut fulfill_cx = <dyn TraitEngine<'_>>::new(tcx);
256256

257257
let mut selcx = SelectionContext::new(infcx);
258258
let (param_env, value) = key.into_parts();

0 commit comments

Comments
 (0)