diff options
| author | bors <bors@rust-lang.org> | 2024-02-11 22:13:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-11 22:13:52 +0000 |
| commit | 520b0b20aa8c218f84cefc6260f52406b84fa55f (patch) | |
| tree | 0f5fd18fd5cc421846bba43684e5606ab6048d49 /compiler/rustc_ty_utils/src/instance.rs | |
| parent | 1a648b397dedc98ada3dd3360f6d661ec2436c56 (diff) | |
| parent | 24d806ccfa0842f5b65f90a9145fd2439d5c4d34 (diff) | |
| download | rust-520b0b20aa8c218f84cefc6260f52406b84fa55f.tar.gz rust-520b0b20aa8c218f84cefc6260f52406b84fa55f.zip | |
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.
Diffstat (limited to 'compiler/rustc_ty_utils/src/instance.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/instance.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index eae80199ce5..7fa416197b3 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -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(..) |
