rust/compiler/rustc_trait_selection/src/traits
Matthias Krüger df3712ce21
Rollup merge of #121193 - compiler-errors:coherence-fulfillment, r=lcnr
Use fulfillment in next trait solver coherence

Use fulfillment in the new trait solver's `impl_intersection_has_impossible_obligation` routine. This means that inference that falls out of processing other obligations can influence whether we can determine if an obligation is impossible to satisfy. See the committed test.

This should be completely sound, since evaluation and fulfillment both respect intercrate mode equally.

We run the risk of breaking coherence later if we were to change the rules of fulfillment and/or inference during coherence, but this is a problem which affects evaluation, as nested obligations from a trait goal are processed together and can influence each other in the same way.

r? lcnr
cc #114862

Also changed obligationctxt -> fulfillmentctxt because it feels kind of redundant to use an ocx here. I don't really care enough and can change it back if it really matters much.
2024-02-17 18:47:42 +01:00
..
error_reporting Rollup merge of #121085 - davidtwco:always-eager-diagnostics, r=nnethercote 2024-02-17 18:47:40 +01:00
query Nits 2024-02-16 15:07:37 +00:00
select Consider principal trait ref's auto-trait super-traits in dyn upcasting 2024-02-15 15:38:11 +00:00
specialize Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00
auto_trait.rs Bump indexmap 2024-02-13 21:03:34 +00:00
coherence.rs Use fulfillment in next trait solver coherence 2024-02-16 23:53:09 +00:00
const_evaluatable.rs Use fewer delayed bugs. 2024-02-14 20:30:37 +11:00
engine.rs Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00
fulfill.rs Do not report overflow errors on ConstArgHasType goals 2024-02-14 18:02:55 +00:00
misc.rs Deeply normalize when processing registered region obligations 2024-01-30 00:06:53 +00:00
mod.rs Dejargnonize subst 2024-02-12 15:46:35 +09:00
object_safety.rs Use fewer delayed bugs. 2024-02-14 20:30:37 +11:00
outlives_bounds.rs Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00
project.rs Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00
structural_match.rs Use fewer delayed bugs. 2024-02-14 20:30:37 +11:00
structural_normalize.rs Move trait into attr so it's greppable 2024-02-16 15:07:37 +00:00
util.rs Dejargnonize subst 2024-02-12 15:46:35 +09:00
vtable.rs Dejargnonize subst 2024-02-12 15:46:35 +09:00
wf.rs Dejargnonize subst 2024-02-12 15:46:35 +09:00