Skip to content
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

borrow-vec associated with bad sty: &ty_err #15466

Closed
mahkoh opened this issue Jul 6, 2014 · 1 comment
Closed

borrow-vec associated with bad sty: &ty_err #15466

mahkoh opened this issue Jul 6, 2014 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@mahkoh
Copy link
Contributor

mahkoh commented Jul 6, 2014

fn main() {
    extern {
        fn f(v: *mut i8);
    }
    // let mut buf = [0i8];
    // let mut buf = [0u8];
    // let mut buf = [0u];
    let mut buf = [0];
    unsafe { f(buf.as_mut_ptr() as *mut _); }
}
test.rs:6:16: 6:19 error: internal compiler error: borrow-vec associated with bad sty: &ty_err
test.rs:6     unsafe { f(buf.as_mut_ptr() as *mut _); }

Worked some time ago. All other versions work.

@huonw
Copy link
Member

huonw commented Jul 6, 2014

Dupe of #7813. Now that integer fallback is removed, the element type of the array is unknown, causing the method call to ice (previously it was inferring to int, so the cast was converting *mut int to *mut i8).

@huonw huonw closed this as completed Jul 6, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 21, 2023
internal: Add offset param to token descending API

The offset is unused for now as we can't map by spans yet but it will be required for rust-lang/rust-analyzer#11260 to work once the token map has been changed to record spans
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