diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-01-08 07:05:23 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-01-23 14:46:59 +0000 |
| commit | d5a1609ec450d624fd8bf3f88647e966cf83eee8 (patch) | |
| tree | 0512e52347cfccd9f44b9f26048684b217b80e74 | |
| parent | e477cf9475540bf7f5f71940b29fc065cb988982 (diff) | |
| download | rust-d5a1609ec450d624fd8bf3f88647e966cf83eee8.tar.gz rust-d5a1609ec450d624fd8bf3f88647e966cf83eee8.zip | |
review comment: use `fcx.infcx`
| -rw-r--r-- | compiler/rustc_hir_typeck/src/coercion.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_hir_typeck/src/coercion.rs b/compiler/rustc_hir_typeck/src/coercion.rs index 752e3f79d4a..893d1e88bf8 100644 --- a/compiler/rustc_hir_typeck/src/coercion.rs +++ b/compiler/rustc_hir_typeck/src/coercion.rs @@ -1645,9 +1645,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> { let e = substs_e.type_at(1); let f = substs_f.type_at(1); if fcx - .tcx - .infer_ctxt() - .build() + .infcx .type_implements_trait( fcx.tcx.get_diagnostic_item(sym::Into).unwrap(), [fcx.tcx.erase_regions(f), fcx.tcx.erase_regions(e)], |
