Skip to content

ICE "thread 'rustc' has overflowed its stack" on Windows (1.5 nightly x86_64 msvc toolchain) #28946

@randomPoison

Description

@randomPoison

I've got the following trait and impl:

pub trait Dot<Other=Self> {
    type Output;

    fn dot(self, rhs: Other) -> Self::Output;
}

impl<'a, T> Dot<&'a T> for T where T: Dot<T> + Copy {
    type Output = T::Output;

    fn dot(self, rhs: &T) -> Self::Output {
        self.dot(*rhs)
    }
}

When I change the impl to:

impl<'a, T, U> Dot<&'a U> for T where T: Dot<U>, U: Copy {
    type Output = T::Output;

    fn dot(self, rhs: &U) -> Self::Output {
        self.dot(*rhs)
    }
}

I get the error thread 'rustc' has overflowed its stack.

This is happening on the current nightly build (10/10/2015) with the x86_64 Windows MSVC toolchain. I tried to reproduce the error with just the above code but that didn't cause the error, but compiling the entire crate it's in did. The full crate (including commented out code that causes error) can be found here, the code that causes the error is in src/lib.rs.

Misc. Notes

  • Using the 1.5 nightly build (10/10) of the x86_64 MSVC toolchain.
  • Running Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions