-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal compiler error using rustc 1.0.0-beta #24352
Comments
Minified: fn main() {
1.0f64 - 1.0;
1.0f64 - 1;
} Seems like the trait cache is broken. |
Well it's not just the trait-cache: DEBUG:rustc::middle::traits::select: CACHE MISS: cache_fresh_trait_pred=Binder(TraitPredicate(<f64 as Sub<FreshIntTy(0)>>)), candidate=ImplCandidate(DefId { krate: 0, node: 18 }:f64.Sub) How can |
The problem here is that freshen turns both |
There is no subtyping relationship between the types (or their non-freshened variants), so they can not be merged. Fixes rust-lang#22645 Fixes rust-lang#24352 Fixes rust-lang#23825 Should fix rust-lang#25235 (no test in issue). Should fix rust-lang#19976 (test is outdated).
The simplified code below results in an ICE using the following rust version
rustc 1.0.0-beta (9854143 2015-04-02) (built 2015-04-02)
binary: rustc
commit-hash: 9854143
commit-date: 2015-04-02
build-date: 2015-04-02
host: x86_64-apple-darwin
release: 1.0.0-beta
---- CODE resulting in ICE -------
The issue appears to be the second to last line. The compiler should reject (k-1). Changing this to
results in proper compilation. Also, removing the previous scope of the for loop works and the compiler then properly complains about the (k-1) bit. Below is the backtrace:
----- BACKTRACE ----
The text was updated successfully, but these errors were encountered: