diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-03 16:53:17 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-11 23:24:49 +0200 |
| commit | ebebb3164a0872016d68ff2b7a0fd73bab3ea465 (patch) | |
| tree | b0cd3ba3f33a41f004387da87a16743746fa4744 /src | |
| parent | 9fe31a1b36b22582ffd589842c5c3f49ae1ac56d (diff) | |
| download | rust-ebebb3164a0872016d68ff2b7a0fd73bab3ea465.tar.gz rust-ebebb3164a0872016d68ff2b7a0fd73bab3ea465.zip | |
Add E0536 error explanation
Diffstat (limited to 'src')
| -rw-r--r-- | src/libsyntax/diagnostic_list.rs | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index beaf4ab5cdd..dfec5a43cde 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -69,7 +69,7 @@ fn main() {} ``` For more information about the inline attribute, take a look here: -https://doc.rust-lang.org/reference.html#inline-attributes) +https://doc.rust-lang.org/reference.html#inline-attributes "##, E0535: r##" @@ -100,13 +100,37 @@ fn main() {} ``` For more information about the inline attribute, take a look here: -https://doc.rust-lang.org/reference.html#inline-attributes) +https://doc.rust-lang.org/reference.html#inline-attributes +"##, + +E0536: r##" +No cfg-pattern was found for `not` statement. + +Erroneous code example: + +```compile_fail,E0536 +#[cfg(not())] // error: expected 1 cfg-pattern +pub fn something() {} + +pub fn main() {} +``` + +The `not` statement expects at least one cfg-pattern. Example: + +``` +#[cfg(not(target_os = "linux"))] // ok! +pub fn something() {} + +pub fn main() {} +``` + +For more information about the cfg attribute, take a look here: +https://doc.rust-lang.org/reference.html#conditional-compilation "##, } register_diagnostics! { - E0536, // expected 1 cfg-pattern E0537, // invalid predicate E0538, // multiple [same] items E0539, // incorrect meta item |
