summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan A. Kollasch <jakllsch@kollasch.net>2018-10-30 22:10:53 +0000
committerJonathan A. Kollasch <jakllsch@kollasch.net>2018-10-30 22:10:53 +0000
commit7cd5d11494c6aa529bef08154534d95a96709d4b (patch)
tree6627febecf872f796bcacebde55b0108fa0e4092
parent2d807eebf42c86b54a04ef89f801bfd05a7b4253 (diff)
downloadrust-libc-7cd5d11494c6aa529bef08154534d95a96709d4b.tar.gz
style: allow target_arch #[cfg()] statements
-rw-r--r--ci/style.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ci/style.rs b/ci/style.rs
index bf31576b90..6671d1c417 100644
--- a/ci/style.rs
+++ b/ci/style.rs
@@ -128,7 +128,8 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
err.error(path, i, "use `extern` instead of `extern \"C\"");
}
if line.contains("#[cfg(") && !line.contains(" if ")
- && !line.contains("target_endian")
+ && !(line.contains("target_endian") ||
+ line.contains("target_arch"))
{
if state != State::Structs {
err.error(path, i, "use cfg_if! and submodules \