Rollup merge of #110671 - compiler-errors:polarity, r=lcnr
Consider polarity in new solver
It's kinda ugly to have a polarity check in all of the builtin impls -- I guess I could consider the polarity at the top of assemble-builtin but that would require adding a polarity fn to `GoalKind`...
🤷 putting this up just so i dont forget, since it's needed to bootstrap core during coherence (this alone does not allow core to bootstrap though, additional work is needed!)
r? ``@lcnr``
This commit is contained in:
commit
95e9f68eb5
4 changed files with 126 additions and 3 deletions
|
@ -861,6 +861,11 @@ impl<'tcx> PolyTraitPredicate<'tcx> {
|
|||
pub fn is_const_if_const(self) -> bool {
|
||||
self.skip_binder().is_const_if_const()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn polarity(self) -> ImplPolarity {
|
||||
self.skip_binder().polarity
|
||||
}
|
||||
}
|
||||
|
||||
/// `A: B`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue