diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-02 15:55:17 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-02 17:28:03 -0400 |
| commit | b1059ccda210e11c19b3c639a13ddd64de781daf (patch) | |
| tree | a96817d5cd61b9e690e48dc079395ce3905eb7fe /compiler/rustc_borrowck | |
| parent | 3273ccea4b2c1995a7ddd059657ded593eb859c9 (diff) | |
| download | rust-b1059ccda210e11c19b3c639a13ddd64de781daf.tar.gz rust-b1059ccda210e11c19b3c639a13ddd64de781daf.zip | |
Instance::resolve -> Instance::try_resolve, and other nits
Diffstat (limited to 'compiler/rustc_borrowck')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/region_errors.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index 44ab762f66e..7ef53fa2078 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -3733,7 +3733,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> { if tcx.is_diagnostic_item(sym::deref_method, method_did) { let deref_target = tcx.get_diagnostic_item(sym::deref_target).and_then(|deref_target| { - Instance::resolve(tcx, self.param_env, deref_target, method_args) + Instance::try_resolve(tcx, self.param_env, deref_target, method_args) .transpose() }); if let Some(Ok(instance)) = deref_target { diff --git a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs index fba18c38146..e1df5a8ec16 100644 --- a/compiler/rustc_borrowck/src/diagnostics/region_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/region_errors.rs @@ -948,7 +948,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> { return; } - if let Ok(Some(instance)) = ty::Instance::resolve( + if let Ok(Some(instance)) = ty::Instance::try_resolve( tcx, self.param_env, *fn_did, |
