Skip to content

'mod extern libc { ... }' shouldn't work #3118

Closed
@brson

Description

@brson

run-pass/foreign-fn-linkname has this declaration:

#[nolink]                                                                                                                                                                     
#[abi = "cdecl"]                                                                                                                                                              
mod extern libc {                                                                                                                                                             
    #[link_name = "strlen"]                                                                                                                                                   
    fn my_strlen(str: *u8) -> uint;                                                                                                                                           
}

I've never seen mod extern before, nor do I understand why this even parses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions