-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
const generic ICE on *stable* #69239
Comments
cargo-bisect-rustc indicates a regression in |
@jonas-schievink : I was under impression that the F-* flags were reserved for bugs that required (in actuality, not solely according to our current specification/desired behavior) the feature flag to occur? I.e. ones that hypothetically could be deprioritized on that basis? Do I have an incorrect impression? |
Hmm, to my knowledge we've usually applied them whenever the feature in question was involved. For things that only occur on nightly, we have the additional |
Oh, wait, it does print:
in the first diagnostic it prints. @DutchGhost we don't print anything about |
okay thanks; I indeed had the wrong impression. |
triage: P-medium, removing nomination label. Assigning to self. (Since this is leveraging a nightly-only feature, and we do emit the diagnostic saying so, this gets relatively lower priority.) |
Digging into this, this ICE seems to come about because the const argument does not inherit the substs of the item it is contained within when in the where clause or generic parameter list. |
…lcnr,estebank Fix missing diagnostic span for `impl Trait` with const generics, and add various tests for `min_const_generics` and `const_generics` Closes rust-lang#61410. Adds `min_const_generics` tests for: - rust-lang#73727 - rust-lang#72293 - rust-lang#67375 - rust-lang#75153 - rust-lang#71922 - rust-lang#69913 - rust-lang#67945 - rust-lang#69239 Adds `const_generics` tests for: - rust-lang#67375 - rust-lang#75153 - rust-lang#71922 - rust-lang#69913 - rust-lang#67945 - rust-lang#69239 (I only added separate `min_const_generics` and `const_generics` tests if they were handled differently by the two features.) We need to figure out how to deduplicate when `const_generics` is stabilised, but we can discuss that later. For now, we should be checking neither feature breaks, so require regression tests for both. I've given them identical names when I've added both, which should make it easier to spot them later. r? @lcnr
No longer ICEs since #78809 |
I tried this code on stable:
I expected to see this happen: For one, report an error that Im using const generics without a feature flag. For two, report an error Im uising an intrinsic without a feature flag.
Instead, this happened: The above code crashed the compiler.
Meta
rustc --version --verbose
:A quick check in godbolt gives that the ICE's started in 1.35 and onwards. This also includes the current nightly and beta.
Backtrace
The text was updated successfully, but these errors were encountered: