Rollup merge of #137314 - lcnr:cycles-with-unknown-kind, r=compiler-errors
change definitely unproductive cycles to error builds on top of #136824 by adding a third variant to `PathKind` for paths which may change to be coinductive in the future but must not be so right now. Most notably, impl where-clauses of not yet coinductive traits. With this, we can change cycles which are definitely unproductive to a proper error. This fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/114. This does not affect stable as we keep these cycles as ambiguous during coherence. r? ````````@compiler-errors```````` ````````@nikomatsakis````````
This commit is contained in:
commit
d55e2e4333
21 changed files with 287 additions and 207 deletions
|
@ -440,7 +440,7 @@ impl<'tcx> ProofTreeVisitor<'tcx> for BestObligation<'tcx> {
|
|||
match (child_mode, nested_goal.source()) {
|
||||
(
|
||||
ChildMode::Trait(_) | ChildMode::Host(_),
|
||||
GoalSource::Misc | GoalSource::NormalizeGoal(_),
|
||||
GoalSource::Misc | GoalSource::TypeRelating | GoalSource::NormalizeGoal(_),
|
||||
) => {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue