Skip to content

note: the compiler unexpectedly panicked. this is a bug. #25877

Closed
@emabee

Description

@emabee
fn main() {
    let mut a = [0;10];
    a[5] = 5;

    let slice = & a[4..7];
    for i in 0..3 {
        println!("slice[{0}]:{1}",i,slice[i]);
    } 

    take(a);

    for i in 0..10 {
        println!("a[{0}]:{1}",i,a[i]);
    }

}


fn take (a [i32]){
//
}

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