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 use of unaligned references in example #317

Merged
merged 1 commit into from
Apr 20, 2022
Merged

Fix use of unaligned references in example #317

merged 1 commit into from
Apr 20, 2022

Conversation

adamgreig
Copy link
Member

A recent change in Rust to deny unaligned reference by default (rust-lang/rust#95372) caused the upstream rust build of this book to break: rust-lang/rust#96108 (comment)

This PR removes the unaligned references, instead using addr_of!() to get a raw pointer to print.

@adamgreig adamgreig requested a review from a team as a code owner April 19, 2022 23:30
@rust-highfive
Copy link

r? @therealprof

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources labels Apr 19, 2022
Copy link
Member

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this!
bors r+

@bors
Copy link
Contributor

bors bot commented Apr 20, 2022

Build succeeded:

@bors bors bot merged commit f7cefbb into master Apr 20, 2022
@bors bors bot deleted the unaligned-refs branch April 20, 2022 10:39
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 21, 2022
Update books

## book

3 commits in 765318b844569a642ceef7bf1adab9639cbf6af3..de0dbffc5812fd885700874e8d258dd334733ac4
2022-04-12 21:14:47 -0400 to 2022-04-18 19:29:45 -0400
- Remove duplicate text
- Add missing punctuation mark in ch16-01
- Update main.rs

## rust-by-example

1 commits in c2a98d9fc5d29c481d42052fbeccfde15ed03116..44a80e8d8bfc5881c9bd69a2cb3a570776ee4181
2022-04-08 06:44:18 -0300 to 2022-04-19 07:46:28 -0300
- Use rust 2018 module file hierarchy (rust-lang/rust-by-example#1532)

## rustc-dev-guide

6 commits in eeb5a83..043e60f
2022-04-11 23:29:48 +0900 to 2022-04-20 18:57:49 +0900
- Fix a small typo (rust-lang/rustc-dev-guide#1343)
- Extend debugging llvm section (rust-lang/rustc-dev-guide#1290)
- Send people doing *library* stabilizations over to the std-dev-guide (rust-lang/rustc-dev-guide#1317)
- Fix typo serious->series (rust-lang/rustc-dev-guide#1336)
- Minor type fix (rust-lang/rustc-dev-guide#1337)
- sessiondiagnostic: translation (rust-lang/rustc-dev-guide#1333)

## embedded-book

3 commits in a6de8b6e3ea5d4f0de8b7b9a7e5c1405dc2c2ddb..f7cefbb995eec8c6148f213235e9e2e03268e775
2022-03-17 21:21:39 +0000 to 2022-04-20 10:38:51 +0000
- Fix use of unaligned references in example  (rust-embedded/book#317)
- Correct C interop declarations  (rust-embedded/book#315)
- Update index.md  (rust-embedded/book#316)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants