Skip to content

ICE on assert!("test") #28308

Closed
Closed
@wesleywiser

Description

@wesleywiser

While playing around on the playground, I found that this reports an ICE:

fn main() {
    assert!("test");
}
<std macros>:2:4: 2:19 error: cannot apply unary operator `!` to type `&'static str`
(internal compiler error: unprintable span)
<std macros>:1:1: 5:46 note: in expansion of assert!
<anon>:2:5: 2:21 note: expansion site
error: aborting due to previous error
playpen: application terminated with error code 101

This repros on stable, beta, and nightly

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