Skip to content

Make inductive cycles in coherence ambiguous always - #118649

Merged
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:coherence-ambig
Jan 9, 2024
Merged

bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:coherence-ambig

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

Logical conclusion of #114040
One step after #116493

cc rust-lang/trait-system-refactor-initiative#20

r? lcnr to kick off the FCP after review... maybe we should wait until 1.75 is landed? In that case, I'd still like to get the FCP boxes checked sooner since that'll be near the holidays which means everyone's away.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 5, 2023

// This impl overlaps with the `derive` unless we reject the nested
// `Interval<?1>: PartialOrd<Interval<?1>>` candidate which results
// in a - currently inductive - cycle.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait this comment can stay

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you add another set of - here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea

@compiler-errors compiler-errors added T-types Relevant to the types team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 5, 2023
@bors

bors commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #118655) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@bors

bors commented Dec 7, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #118324) made this pull request unmergeable. Please resolve the merge conflicts.

@lcnr

lcnr commented Dec 8, 2023 •

Copy link
Copy Markdown
Contributor

r=me after FCP

The coinductive_overlap_in_coherence lint has been deny by default and report now since #116493, which is part of 1.75 (which will be stabilized on the 2023.12.28)

I propose we change this lint to a hard error in version 1.77, which will be nightly starting from the 2023.12.22 and be stabilized on the 2024.03.21. This is a step towards coinductive traits and matches the existing behavior of -Ztrait-solver=next-coherence, which will probably also stabilize in 1.77 or 1.78. The original crater run resulted in a single regression: #114023 (comment). We opened an issue on the affected repo: kazatsuyu/interval-map#1. I do not believe this needs a separate crater run.

@rfcbot fcp merge

@rfcbot

rfcbot commented Dec 8, 2023 •