Auto merge of #120619 - compiler-errors:param, r=lcnr
Assert that params with the same *index* have the same *name* Found this bug when trying to build libcore with the new solver, since it will canonicalize two params with the same index into *different* placeholders if those params differ by name.
This commit is contained in:
commit
520b0b20aa
10 changed files with 90 additions and 41 deletions
|
@ -209,10 +209,8 @@ fn resolve_associated_item<'tcx>(
|
|||
let name = tcx.item_name(trait_item_id);
|
||||
if name == sym::clone {
|
||||
let self_ty = trait_ref.self_ty();
|
||||
|
||||
let is_copy = self_ty.is_copy_modulo_regions(tcx, param_env);
|
||||
match self_ty.kind() {
|
||||
_ if is_copy => (),
|
||||
ty::FnDef(..) | ty::FnPtr(_) => (),
|
||||
ty::Coroutine(..)
|
||||
| ty::CoroutineWitness(..)
|
||||
| ty::Closure(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue