1
Fork 0

Let mk_fn_def take an iterator instead to simplify some call sites

This commit is contained in:
Oli Scherer 2022-12-13 10:37:19 +00:00
parent 7fd9beedc2
commit 0fe86aa977
4 changed files with 14 additions and 10 deletions

View file

@ -838,8 +838,6 @@ fn trait_method<'tcx>(
method_name: Symbol,
substs: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
) -> ConstantKind<'tcx> {
let substs = tcx.mk_substs(substs.into_iter().map(Into::into));
// The unhygienic comparison here is acceptable because this is only
// used on known traits.
let item = tcx