Skip to content

"use std" before #[link(...)] in .rc file causes an error #2243

Closed
@erickt

Description

@erickt

rustc errors out when compiling a ".rc" file if use std comes before the #link(...):

test:rc

use std;

#[link(name="test", vers="0.1")];

mod test;

test.rs:

fn main() {}

Errors with:

test.rc:3:32: 3:33 error: expecting mod, found ;
test.rc:3 #[link(name="test", vers="0.1")];

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions