-
Notifications
You must be signed in to change notification settings - Fork 59
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 compilation error in spi.rs for rust Version 1.73+ #170
Conversation
NOTE: I have not tested this on hardware, just added the allow attribute. Also see [this](rust-lang/rust#116410) issue
See also stm32-rs/stm32f7xx-hal#207 and stm32-rs/stm32f3xx-hal#346 which had the same problem and a couple other options for fixing it. |
@JanekGraff Thanks for trying to fix this. Would you mind changing to Unrelated nit: Could you please remove the added newlines between the links in the CHANGELOG.md? |
Sure thing, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
With rust version 1.73.0 the
invalid_reference_casting
lint was set to deny by default. (See PR#112431. This causes the build process of this crate to fail to build spi.rs (only when building the crate with its examples, when adding it as a dependency works fine from what i can see).This change fixes the compilation by adding the
[allow(invalid_reference_casting)]
attribute to the relevant parts.This also fixes a
unused doc comment
compilation warning in rcc.rsNOTE
I have not tested this on hardware, just added the attribute to fix the compilation.