Skip to content

Add E0264 error explanation #30256

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

Merged
merged 1 commit into from
Dec 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,31 @@ fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { }
```
"##,

E0264: r##"
An unknown external lang item was used. Erroneous code example:

```
#![feature(lang_items)]

extern "C" {
#[lang = "cake"] // error: unknown external lang item: `cake`
fn cake();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmmm, cake

}
```

A list of available external lang items is available in
`src/librustc/middle/weak_lang_items.rs`. Example:

```
#![feature(lang_items)]

extern "C" {
#[lang = "panic_fmt"] // ok!
fn cake();
}
```
"##,

E0265: r##"
This error indicates that a static or constant references itself.
All statics and constants need to resolve to a value in an acyclic manner.
Expand Down Expand Up @@ -2200,7 +2225,6 @@ register_diagnostics! {
// E0134,
// E0135,
E0229, // associated type bindings are not allowed here
E0264, // unknown external lang item
E0278, // requirement is not satisfied
E0279, // requirement is not satisfied
E0280, // requirement is not satisfied
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/weak_lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ impl<'a> Context<'a> {
}
} else)* {
span_err!(self.sess, span, E0264,
"unknown external lang item: `{}`",
name);
"unknown external lang item: `{}`",
name);
}
}
}
Expand Down