Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up[Nightly 1.4.0-4f33e43cb 2015-08-05] Compiler panic when mis-using Zero trait #27591
Comments
sfackler
added
A-diagnostics
I-ICE
and removed
A-diagnostics
labels
Aug 8, 2015
This comment has been minimized.
This comment has been minimized.
|
duplicate of #28344 |
arielb1
closed this
Sep 14, 2015
arielb1
referenced this issue
Sep 15, 2015
Merged
Fixed regression in associated item resolution #28395
brson
added
regression-from-stable-to-nightly
I-nominated
labels
Sep 15, 2015
This comment has been minimized.
This comment has been minimized.
|
This was reportedly a 1.3 regression. Fixed in 1.4. |
brson
removed
the
I-nominated
label
Sep 15, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lightsfury commentedAug 8, 2015
Attempting to misuse a trait can cause a compiler panic. The offending code is a simplified version of what I was working on.
I tried this code:
After reviewing the documentation, I expect this to throw a syntax error. Specifically, because the let RHS should be written as:
<<T as Rem>::Output as Zero>::zero. This code does compile and work as expected.I don't know if this is specific to the Zero trait as I was able to use it like this:
Meta
rustc --version --verbose:Backtrace: