Instance::resolve -> Instance::try_resolve, and other nits
This commit is contained in:
parent
3273ccea4b
commit
b1059ccda2
22 changed files with 44 additions and 27 deletions
|
@ -768,7 +768,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
|
|||
is_trait = true;
|
||||
|
||||
if let Ok(Some(instance)) =
|
||||
Instance::resolve(tcx, param_env, callee, fn_args)
|
||||
Instance::try_resolve(tcx, param_env, callee, fn_args)
|
||||
&& let InstanceKind::Item(def) = instance.def
|
||||
{
|
||||
// Resolve a trait method call to its concrete implementation, which may be in a
|
||||
|
|
|
@ -618,7 +618,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
|
|||
trace!("resolve: {:?}, {:#?}", def, args);
|
||||
trace!("param_env: {:#?}", self.param_env);
|
||||
trace!("args: {:#?}", args);
|
||||
match ty::Instance::resolve(*self.tcx, self.param_env, def, args) {
|
||||
match ty::Instance::try_resolve(*self.tcx, self.param_env, def, args) {
|
||||
Ok(Some(instance)) => Ok(instance),
|
||||
Ok(None) => throw_inval!(TooGeneric),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue