Skip to content

Commit

Permalink
Auto merge of #30256 - GuillaumeGomez:patch-5, r=Manishearth
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Dec 7, 2015
2 parents 4dbdfb4 + 1b984b5 commit 8864f2c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
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();
}
```
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

0 comments on commit 8864f2c

Please sign in to comment.