Assert that the trait ref does not need inference

This commit is contained in:
Jonas Schievink 2020-03-29 20:01:41 +02:00
parent b00ba382e0
commit 12d9f4efaf

View File

@ -89,6 +89,7 @@ fn resolve_associated_item<'tcx>(
param_env, trait_item, rcvr_substs, impl_data
);
assert!(!rcvr_substs.needs_infer());
assert!(!trait_ref.needs_infer());
let trait_def_id = tcx.trait_id_of_impl(impl_data.impl_def_id).unwrap();
let trait_def = tcx.trait_def(trait_def_id);