-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
const_eval funkiness with overflow #13768
Comments
This addresses the ICE from rust-lang#13763, but it does not allow the test to compile, due to rust-lang#13768. An alternate test was checked in in the meantime. Closes rust-lang#13763
Triage: no change. |
error message changed: fn main() {
const N: u8 = 0 - 1;
let _foo: [u8; 255] = [0; N as usize];
}
|
Note: the error about the array types appears before an error about the array length: fn main() {
const N: u8 = 0;
const M: u8 = 1;
const O: u8 = N - M;
const P: usize = O;
let _foo: [u8; 255] = [0; P];
}
|
(Note that if I ever get #22532 to the point where its bootstrapping rustc, I imagine we'll be forced to resolve this in some fashion. :) ) |
Hmm, apparently my previous assertion was wrong; I expected to see overflowing constant evaluation fail within |
(ah, maybe its because my test was using const-eval adding two |
(just making a note here that I updated description, so that triage script skips this bug for a while longer.) |
cc #23897 |
Not an issue anymore. Should be closed. |
fixes rust-lang#13768 The existing implemention forgets to handle the binding mode (i.e. `ref` and `ref mut`), so I just modified it to cover these cases. changelog: [`manual_let_else`]: fix missing binding mode
Case 1
playpen
Case 2
playpen
The text was updated successfully, but these errors were encountered: