Skip to content

Calling debug_assert! with two arguments causes ICE #18850

@ghost

Description

The following code results in a panic:

//
//
//
//
//
// No error if the file is too short
//
//
//
//
// line 11
fn main() {
    debug_assert!( "me", "me" );
}

producing

task 'rustc' panicked at 'index out of bounds: the len is 12 but the index is 12', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/lib.rs:1

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