Add E0535 error explanation

This commit is contained in:
Guillaume Gomez 2016-07-03 16:47:30 +02:00
parent 38a0177917
commit 9fe31a1b36
1 changed files with 31 additions and 1 deletions

View File

@ -72,10 +72,40 @@ For more information about the inline attribute, take a look here:
https://doc.rust-lang.org/reference.html#inline-attributes)
"##,
E0535: r##"
An unknown argument was given to inline attribute.
Erroneous code example:
```compile_fail,E0535
#[inline(unknown)] // error: invalid argument
pub fn something() {}
fn main() {}
```
The inline attribute only knows two arguments:
* always
* never
All other arguments given to the inline attribute will return this error.
Example:
```
#[inline(never)] // ok!
pub fn something() {}
fn main() {}
```
For more information about the inline attribute, take a look here:
https://doc.rust-lang.org/reference.html#inline-attributes)
"##,
}
register_diagnostics! {
E0535, // invalid argument
E0536, // expected 1 cfg-pattern
E0537, // invalid predicate
E0538, // multiple [same] items