Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eefriedman opened this issue Jun 26, 2015 · 0 comments
Closed

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

eefriedman opened this issue Jun 26, 2015 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@eefriedman
Copy link
Contributor

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
@steveklabnik steveklabnik added the A-diagnostics Area: Messages for errors, warnings, and lints label Jun 26, 2015
eefriedman added a commit to eefriedman/rust that referenced this issue Jul 23, 2015
Pretty straightforward; just need to make sure to explicitly handle
the generic parameters of each ast::ForeignItemFn.

Fixes rust-lang#26587.
bors added a commit that referenced this issue Jul 23, 2015
Pretty straightforward; just need to make sure to explicitly handle
the generic parameters of each ast::ForeignItemFn.

Fixes #26587.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

2 participants