Skip to content

non-fatal overflow makes more code compile #67

@lcnr

Description

@lcnr
Contributor

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() {}

Activity

added
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @lcnr

        Issue actions

          non-fatal overflow makes more code compile · Issue #67 · rust-lang/trait-system-refactor-initiative