Rollup merge of #119505 - fmease:no-host-param-for-trait-fns, r=fee1-dead

Don't synthesize host effect params for trait associated functions marked const

Fixes #113378.

r? fee1-dead or compiler
This commit is contained in:
León Orell Valerian Liehr 2024-01-03 16:08:30 +01:00 committed by GitHub
commit 8bce6fc35e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 285 additions and 64 deletions

View file

@ -315,7 +315,10 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
if is_host_effect {
if let Some(idx) = host_effect_index {
bug!("parent also has host effect param? index: {idx}, def: {def_id:?}");
tcx.dcx().span_delayed_bug(
param.span,
format!("parent also has host effect param? index: {idx}, def: {def_id:?}"),
);
}
host_effect_index = Some(index as usize);