Skip to content

Strange error message on empty asm! macro #34881

Closed
@phil-opp

Description

@phil-opp

The following code produces a strange error:

#![feature(asm)]

fn main() { 
   unsafe { asm!() }
}

The error is:

error: expected expression, found `<eof>`

Playpen link

The error does not contain any file or line information, so it's pretty hard to find the offending line. The error also occurs on stable, where inline assembly isn't even allowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inline-assemblyArea: Inline assembly (`asm!(…)`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions