Skip to content

Weird "use of undeclared lifetime" with foreign function #26587

Closed
@eefriedman

Description

@eefriedman
extern {
   pub fn life<'a>(x:&'a i32);
}
fn main() {}
<anon>:2:23: 2:25 error: use of undeclared lifetime name `'a` [E0261]
<anon>:2    pub fn life<'a>(x:&'a i32);
                               ^~
error: aborting due to previous error
playpen: application terminated with error code 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions