-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: index out of bounds: the len is 12 but the index is 13
#134335
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
Labels
A-async-closures
`async || {}`
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
//@compile-flags: -Zunstable-options --edition=2021 --crate-type=lib
#![feature(async_closure)]
pub async fn async_closure(x: &mut i32) {
let c = async move || {
*x += 1;
};
call_once(c).await;
}
fn call_once<T>(f: impl FnOnce() -> T) -> T {
f()
} bisects to #128506 |
Zalathar
added a commit
to Zalathar/rust
that referenced
this issue
Apr 1, 2025
…r=eholk Feed HIR for by-move coroutine body def, since the inliner tries to read its attrs See the comments in the test. I'm surprised that nobody found this[^1] (edit: nvm haha), but you have to go out of your way to construct the by-move body and then inline it w/ a poll call, so I guess the inliner just never really gets into this situation before. Fixes rust-lang#134335 r? oli-obk [^1]: Well, `@eholk` found this when working on the `iter! {}` macro, since it more dramatically affects those.
Zalathar
added a commit
to Zalathar/rust
that referenced
this issue
Apr 1, 2025
…r=eholk Feed HIR for by-move coroutine body def, since the inliner tries to read its attrs See the comments in the test. I'm surprised that nobody found this[^1] (edit: nvm haha), but you have to go out of your way to construct the by-move body and then inline it w/ a poll call, so I guess the inliner just never really gets into this situation before. Fixes rust-lang#134335 r? oli-obk [^1]: Well, ``@eholk`` found this when working on the `iter! {}` macro, since it more dramatically affects those.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Apr 1, 2025
…r=eholk Feed HIR for by-move coroutine body def, since the inliner tries to read its attrs See the comments in the test. I'm surprised that nobody found this[^1] (edit: nvm haha), but you have to go out of your way to construct the by-move body and then inline it w/ a poll call, so I guess the inliner just never really gets into this situation before. Fixes rust-lang#134335 r? oli-obk [^1]: Well, ```@eholk``` found this when working on the `iter! {}` macro, since it more dramatically affects those.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Apr 2, 2025
Rollup merge of rust-lang#139193 - compiler-errors:inline-synthetic, r=eholk Feed HIR for by-move coroutine body def, since the inliner tries to read its attrs See the comments in the test. I'm surprised that nobody found this[^1] (edit: nvm haha), but you have to go out of your way to construct the by-move body and then inline it w/ a poll call, so I guess the inliner just never really gets into this situation before. Fixes rust-lang#134335 r? oli-obk [^1]: Well, ````@eholk```` found this when working on the `iter! {}` macro, since it more dramatically affects those.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-async-closures
`async || {}`
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zunstable-options --edition=2024 --crate-type=lib
Program output
The text was updated successfully, but these errors were encountered: