Skip to content
Snippets Groups Projects
Commit 7cd5d114 authored by Jonathan A. Kollasch's avatar Jonathan A. Kollasch
Browse files

style: allow target_arch #[cfg()] statements

parent 2d807eeb
No related branches found
No related tags found
No related merge requests found
...@@ -128,7 +128,8 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) { ...@@ -128,7 +128,8 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
err.error(path, i, "use `extern` instead of `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_endian") ||
line.contains("target_arch"))
{ {
if state != State::Structs { if state != State::Structs {
err.error(path, i, "use cfg_if! and submodules \ err.error(path, i, "use cfg_if! and submodules \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment