Skip to content

Raw pointer comparisons are valid constant expressions #25826

Closed
@arielb1

Description

@arielb1
fn f<T>(t: T) -> T { t }
fn main() {
    const A: bool = f::<u8> as *const () < f::<u16> as *const ();
    println!("{}", A);
}

Causes LLVM assertion failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions