Rollup merge of #115727 - fee1-dead-contrib:effect-fallback, r=oli-obk
Implement fallback for effect param r? `@oli-obk` or `@lcnr` tracking issue for this ongoing work: https://github.com/rust-lang/rust/issues/110395
This commit is contained in:
commit
e7a347baf8
26 changed files with 404 additions and 79 deletions
|
@ -523,7 +523,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
Ty::new_misc_error(tcx).into()
|
||||
}
|
||||
}
|
||||
GenericParamDefKind::Const { has_default } => {
|
||||
GenericParamDefKind::Const { has_default, .. } => {
|
||||
let ty = tcx
|
||||
.at(self.span)
|
||||
.type_of(param.def_id)
|
||||
|
|
|
@ -1255,7 +1255,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
|
|||
|
||||
let is_our_default = |def: &ty::GenericParamDef| match def.kind {
|
||||
GenericParamDefKind::Type { has_default, .. }
|
||||
| GenericParamDefKind::Const { has_default } => {
|
||||
| GenericParamDefKind::Const { has_default, .. } => {
|
||||
has_default && def.index >= generics.parent_count as u32
|
||||
}
|
||||
GenericParamDefKind::Lifetime => unreachable!(),
|
||||
|
|
|
@ -328,7 +328,10 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
|
|||
name: param.name.ident().name,
|
||||
def_id: param.def_id.to_def_id(),
|
||||
pure_wrt_drop: param.pure_wrt_drop,
|
||||
kind: ty::GenericParamDefKind::Const { has_default: default.is_some() },
|
||||
kind: ty::GenericParamDefKind::Const {
|
||||
has_default: default.is_some(),
|
||||
is_host_effect: is_host_param,
|
||||
},
|
||||
})
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue