Skip to content

non-fatal overflow makes more code compile #67

@lcnr

Description

@lcnr

duh

e.g. during coherence: https://rust.godbolt.org/z/1PMobhaK7

trait Indirect<T> {}

impl<T: Overflow<()>> Indirect<T> for () {}

trait Overflow<U> {}
impl<T, U> Overflow<U> for Box<T>
where
    U: Indirect<Box<Box<T>>>,
{}

trait NotImplemented {}

trait Trait<U, DUMMY> {}
impl<T, U> Trait<U, u32> for T
where
    // T: NotImplemented, // causes old solver to succeed
    U: Indirect<T>,
    T: NotImplemented,
{}

impl<DUMMY> Trait<(), DUMMY> for Box<u32> {}

fn main() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions