-
Notifications
You must be signed in to change notification settings - Fork 13.3k
expr.rs
index out of bounds: the len is 0 but the index is 0
#123442
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
Comments
Please try to minimize the example as much as possible: fn main() {
transmute();
}
extern "rust-intrinsic" fn transmute() {} |
@rustbot claim |
Thanks @compiler-errors. Just want to add that some other intrinsics also ICE. For example:
ICEs as well. |
Interesting @gurry -- I wonder if we should perhaps fix this in a less specific way than #123526. I wonder if we should instead detect that the If not, then I'd be glad to review a PR that fixes whatever other intrinsics you find to make too many assumptions in the compiler. |
…errors Do not ICE when calling incorrectly defined `transmute` intrinsic Fix rust-lang#123442
Rollup merge of rust-lang#123526 - estebank:issue-123442, r=compiler-errors Do not ICE when calling incorrectly defined `transmute` intrinsic Fix rust-lang#123442
Even adding It happens in rust/compiler/rustc_mir_transform/src/lower_intrinsics.rs Lines 176 to 178 in af25253
To fix it, we could extend what's done for
|
I have opened #123587 |
Looks like intrinsics are expected to ICE if used wrongly (see comment: #123587 (comment)) so #123587 I opened has been rightly closed. But that mean that Thoughts @estebank & @compiler-errors? If you guys agree I can open a PR to remove the tainting. |
See #123603 which takes a different approach |
Nice! |
Code
(reduced)
(original)
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: