Skip to content

Commit 028c796

Browse files
Add E0533 error explanation
1 parent 3ab8054 commit 028c796

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/libsyntax/diagnostic_list.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -16,8 +16,22 @@
1616
register_long_diagnostics! {
1717

1818
E0533: r##"
19+
The export_name attribute was badly formatted.
20+
21+
Erroneous code example:
22+
1923
```compile_fail,E0533
20-
#[export_name]
24+
#[export_name] // error: export_name attribute has invalid format
25+
pub fn something() {}
26+
27+
fn main() {}
28+
```
29+
30+
The export_name attribute expects a string in order to determine the name of
31+
the exported symbol. Example:
32+
33+
```
34+
#[export_name = "some function"] // ok!
2135
pub fn something() {}
2236
2337
fn main() {}

0 commit comments

Comments
 (0)