Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings detected in upcoming toolchains #158

Merged
merged 2 commits into from
May 14, 2024

Conversation

mciantyre
Copy link
Member

Future Rust toolchains will warn about unknown cfgs and introduce more clippy warnings. This PR eagerly fixes those warnings. See commits for more information.

mciantyre added 2 commits May 10, 2024 13:13
Rust 1.80 will warn if a package uses a cfg that it doesn't know about
[1]. We can teach the compiler about our custom board, family, and chip
configurations in our build scripts.

Tested against a nightly 1.80 toolchain with the following commands:

    cargo +nightly build --package=imxrt-hal --features=imxrt-ral/imxrt1062,imxrt1060
    cargo +nightly build --package=imxrt-log --features=imxrt-hal/imxrt1060,imxrt-ral/imxrt1062
    cargo +nightly build --package=board --features=board/teensy4

Re-run those commands without this commit, and observe warnings
describing missing configurations.

[1]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
@mciantyre mciantyre marked this pull request as ready for review May 10, 2024 17:17
@teburd
Copy link
Member

teburd commented May 10, 2024

neat feature, for checking features :-D

@mciantyre mciantyre merged commit 8063398 into imxrt-rs:main May 14, 2024
31 checks passed
@mciantyre mciantyre deleted the cfg-checks branch May 14, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants