1
Fork 0

Rollup merge of #127437 - compiler-errors:uplift-trait-ref-is-knowable, r=lcnr

Uplift trait ref is knowable into `rustc_next_trait_solver`

Self-explanatory. Eliminates one more delegate method.

r? lcnr cc ``@fmease``
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-07-08 13:04:32 +08:00 committed by GitHub
commit 928d71f17b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 520 additions and 480 deletions

View file

@ -1523,7 +1523,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// bound regions.
let trait_ref = predicate.skip_binder().trait_ref;
coherence::trait_ref_is_knowable::<!>(self.infcx, trait_ref, |ty| Ok(ty)).unwrap()
coherence::trait_ref_is_knowable(self.infcx, trait_ref, |ty| Ok::<_, !>(ty)).into_ok()
}
/// Returns `true` if the global caches can be used.