Skip to content

coherence errors: inspect analyse visitor causes hangs #136243

Open
@lcnr

Description

@lcnr
#![recursion_limit = "128"]
trait Recur {}
impl<T> Recur for T
where
    (T, ()): Recur,
    ((), T): Recur,
{
}

trait NotImplemented {}
impl<T: NotImplemented> Recur for (T,) {}

fn main() {}

hangs with -Znext-solver=coherence due to exponential blowup somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-coherenceArea: CoherenceC-bugCategory: This is a bug.I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions