summaryrefslogtreecommitdiff
path: root/libc/ci/style.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-10 21:00:27 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-10 21:00:27 -0800
commite2604a756aaddcd5919ee2f1b9cc0055d200f846 (patch)
tree1ea1b9900db20d3aadbddbce18882d0c957247d7 /libc/ci/style.rs
parent5875df6c958743cf86c75b2cb5fc2efe5ca0de43 (diff)
downloadnitrocli-e2604a756aaddcd5919ee2f1b9cc0055d200f846.tar.gz
nitrocli-e2604a756aaddcd5919ee2f1b9cc0055d200f846.tar.bz2
Update libc crate to 0.2.45
This change updates the libc crate to version 0.2.45. Import subrepo libc/:libc at f5636fc618f8e16968b3178196d73c94ad9f7b05
Diffstat (limited to 'libc/ci/style.rs')
-rw-r--r--libc/ci/style.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/libc/ci/style.rs b/libc/ci/style.rs
index 32e4ba7..747e26c 100644
--- a/libc/ci/style.rs
+++ b/libc/ci/style.rs
@@ -72,6 +72,8 @@ fn walk(path: &Path, err: &mut Errors) {
"dox.rs" |
"lib.rs" |
+ "ctypes.rs" |
+ "libc.rs" |
"macros.rs" => continue,
_ => {}
@@ -127,7 +129,10 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
if line.contains("extern \"C\"") {
err.error(path, i, "use `extern` instead of `extern \"C\"");
}
- if line.contains("#[cfg(") && !line.contains(" if ") {
+ if line.contains("#[cfg(") && !line.contains(" if ")
+ && !(line.contains("target_endian") ||
+ line.contains("target_arch"))
+ {
if state != State::Structs {
err.error(path, i, "use cfg_if! and submodules \
instead of #[cfg]");