Error code E0536

The not cfg-predicate was malformed.

Erroneous code example:

#[cfg(not())] // error: expected 1 cfg-pattern
pub fn something() {}

pub fn main() {}
Run

The not predicate expects one cfg-pattern. Example:

#[cfg(not(target_os = "linux"))] // ok!
pub fn something() {}

pub fn main() {}
Run

For more information about the cfg attribute, read the section on Conditional Compilation in the Reference.

Back to list of error codes