Merge HostPolarity and BoundConstness

This commit is contained in:
Michael Goulet
2024-10-29 23:42:59 +00:00
parent 298c7462c3
commit 802f3a78a6
16 changed files with 66 additions and 81 deletions

View File

@@ -84,11 +84,11 @@ impl<'tcx> Bounds<'tcx> {
&mut self,
tcx: TyCtxt<'tcx>,
bound_trait_ref: ty::PolyTraitRef<'tcx>,
host: ty::HostPolarity,
constness: ty::BoundConstness,
span: Span,
) {
if tcx.is_const_trait(bound_trait_ref.def_id()) {
self.clauses.push((bound_trait_ref.to_host_effect_clause(tcx, host), span));
self.clauses.push((bound_trait_ref.to_host_effect_clause(tcx, constness), span));
} else {
tcx.dcx().span_delayed_bug(span, "tried to lower {host:?} bound for non-const trait");
}