Skip to content

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

Closed
@mahkoh

Description

@mahkoh
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions