blob: c081a3d9cfa87e5b2b54eccaa862388e4026aebe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
The `not` cfg-predicate was malformed.
Erroneous code example:
```compile_fail,E0536
#[cfg(not())] // error: expected 1 cfg-pattern
pub fn something() {}
pub fn main() {}
```
The `not` predicate expects one cfg-pattern. Example:
```
#[cfg(not(target_os = "linux"))] // ok!
pub fn something() {}
pub fn main() {}
```
For more information about the `cfg` attribute, read the section on
[Conditional Compilation][conditional-compilation] in the Reference.
[conditional-compilation]: https://doc.rust-lang.org/reference/conditional-compilation.html
|