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

Avoid creating intermediate references to packed fields #225

Merged
merged 2 commits into from
Aug 2, 2021

Conversation

richardeoin
Copy link
Member

Such an intermediate reference is UB, even if it is never dereferenced. The previous code that created addresses / raw pointers via intermediate references will become a hard error in a future version of Rust. Use core::ptr::addr_of instead.

This PR increases the MSRV to 1.51.0

@richardeoin richardeoin added this to the v0.11.0 release milestone Jul 20, 2021
@richardeoin richardeoin mentioned this pull request Jul 21, 2021
Such an intermediate reference is UB, even if it is never dereferenced. The
previous code that created addresses / raw pointers via intermediate references
will become a hard error in a future version of Rust. Use
[core::ptr::addr_of](https://doc.rust-lang.org/core/ptr/macro.addr_of.html)
instead.

This commit increases the MSRV to 1.51.0
@richardeoin
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Aug 2, 2021
225: Avoid creating intermediate references to packed fields r=richardeoin a=richardeoin

Such an intermediate reference is UB, even if it is never dereferenced. The previous code that created addresses / raw pointers via intermediate references will become a hard error in a future version of Rust. Use [core::ptr::addr_of](https://doc.rust-lang.org/core/ptr/macro.addr_of.html) instead.

This PR increases the MSRV to 1.51.0

Co-authored-by: Richard Meadows <962920+richardeoin@users.noreply.github.com>
@bors
Copy link
Contributor

bors bot commented Aug 2, 2021

Canceled.

@richardeoin
Copy link
Member Author

bors retry

@bors bors bot merged commit e9d058d into stm32-rs:master Aug 2, 2021
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.

1 participant