Skip to content

invalid location with #debug type error #1387

Closed
@erickt

Description

@erickt

This code highlights an invalid code location:

fn main() {
    let x = [1,2,3];
    #debug(x);
}

Returns this error message:

foo.rs:4:186: 4:187 error: first argument to #fmt must be a string literal.
foo.rs:4 }
                                                                                                                                                                                                   ^
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:71
rust: domain main @0x102029600 root task failed
rust: fatal, 'leaked memory in rust main loop (2 objects)' failed, ../src/rt/memory_region.cpp:158 2 objects

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions