librustc: adjust logic for cfg attribute and add not predicate.
Tests for cfg attribute.