-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Assertion failed. Assigning static item using out of bounds index. #13701
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
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
/cc @eddyb |
triage:
|
tl;dr: this bug appears to be fixed. @pix64's example does not crash but still gives an out of bound error: const VEC: [isize; 4] = [0, 1, 2, 3];
fn main() {
static v: isize = VEC[6];
} |
Yay! |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Nov 28, 2024
changelog: [`missing_safety_doc`]: accept uppercase "SAFETY" In [Oxc](https://github.com/oxc-project/oxc)'s codebase, we try to draw attention as clearly as possible to the safety constraints of unsafe code by including an uppercase `# SAFETY` doc comment. Clippy's `missing_safety_doc` lint does not recognise "SAFETY" in upper case, so we also need to include `#[expect(clippy::missing_safety_doc)]` on every unsafe function, to avoid a false positive. Unfortunately this defeats the purpose of the lint, as if someone later removes the safety docs, the lint rule does not trigger. I don't know how common this style of documenting unsafe functions is, but I don't imagine also supporting `# SAFETY` would disturb other users who prefer `# Safety`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attempting to compile the following code causes rustc to crash.
Windows 8.1
rustc 0.11-pre-nightly (7d725a3 2014-04-21 23:01:39 -0700)
host: i686-pc-mingw32
Xubuntu 13.10
rustc 0.11-pre-nightly (a5cd502 2014-04-22 02:06:35 -0700)
host: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: