From 9fe31a1b36b22582ffd589842c5c3f49ae1ac56d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 3 Jul 2016 16:47:30 +0200 Subject: [PATCH] Add E0535 error explanation --- src/libsyntax/diagnostic_list.rs | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index c823d030157..beaf4ab5cdd 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -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