Skip to content

ICE casting fat raw pointer to non-fat pointer #18396

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

Closed
FreeFull opened this issue Oct 28, 2014 · 3 comments
Closed

ICE casting fat raw pointer to non-fat pointer #18396

FreeFull opened this issue Oct 28, 2014 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@FreeFull
Copy link
Contributor

fn main() {
    let foo: &mut [u8] = &mut [1,2,3];
    foo as *mut [u8] as *mut u8;
}
error: internal compiler error: translating unsupported cast: *mut [u8] (cast_other) -> *mut u8 (cast_pointer)
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:175
@japaric
Copy link
Member

japaric commented Oct 28, 2014

Possible duplicate of #17167

@FreeFull
Copy link
Contributor Author

It does seem to be a duplicate. I guess we'll see once it gets fixed.

@flaper87 flaper87 added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 13, 2014
@flaper87
Copy link
Contributor

closing as a duplicate of #17167

I moved the code and traceback of this bug to the other one. Thanks for the report 👍

(also feel free to re-open if you think it is not a duplicate)

lnicola added a commit to lnicola/rust that referenced this issue Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants