]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0536.md
Auto merge of #66396 - smmalis37:pythontest, r=alexcrichton
[rust.git] / src / librustc_error_codes / error_codes / E0536.md
1 The `not` cfg-predicate was malformed.
2
3 Erroneous code example:
4
5 ```compile_fail,E0536
6 #[cfg(not())] // error: expected 1 cfg-pattern
7 pub fn something() {}
8
9 pub fn main() {}
10 ```
11
12 The `not` predicate expects one cfg-pattern. Example:
13
14 ```
15 #[cfg(not(target_os = "linux"))] // ok!
16 pub fn something() {}
17
18 pub fn main() {}
19 ```
20
21 For more information about the cfg attribute, read:
22 https://doc.rust-lang.org/reference.html#conditional-compilation