diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-03 16:24:19 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-11 23:24:49 +0200 |
| commit | 028c7963631433b59df3b8c138cd6c966ed26a76 (patch) | |
| tree | 0e546362437ab7632e96c48237eda835a7c9bfc7 /src/libsyntax | |
| parent | 3ab8054ac182fc170099135304a0c1c6760da57a (diff) | |
| download | rust-028c7963631433b59df3b8c138cd6c966ed26a76.tar.gz rust-028c7963631433b59df3b8c138cd6c966ed26a76.zip | |
Add E0533 error explanation
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/diagnostic_list.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index eb30657bd56..3000d639fd6 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -16,8 +16,22 @@ register_long_diagnostics! { E0533: r##" +The export_name attribute was badly formatted. + +Erroneous code example: + ```compile_fail,E0533 -#[export_name] +#[export_name] // error: export_name attribute has invalid format +pub fn something() {} + +fn main() {} +``` + +The export_name attribute expects a string in order to determine the name of +the exported symbol. Example: + +``` +#[export_name = "some function"] // ok! pub fn something() {} fn main() {} |
