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

offset_of docs examples use assert! instead of assert_eq! #122716

Closed
esoterra opened this issue Mar 18, 2024 · 3 comments
Closed

offset_of docs examples use assert! instead of assert_eq! #122716

esoterra opened this issue Mar 18, 2024 · 3 comments
Assignees
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@esoterra
Copy link

esoterra commented Mar 18, 2024

Location

In the code block right before the Examples header

https://doc.rust-lang.org/stable/std/mem/macro.offset_of.html

Summary

I believe where it uses assert! the assert_eq! macro was meant.

@esoterra esoterra added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Mar 18, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 18, 2024
@workingjubilee workingjubilee added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 19, 2024
@workingjubilee
Copy link
Member

Sounds about right!

@heisen-li
Copy link
Contributor

I'd like to try to do this. @rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 19, 2024
Rollup merge of rust-lang#122720 - heisen-li:offset_of, r=workingjubilee

[doc]:fix error code example

fixs rust-lang#122716
@joboet
Copy link
Member

joboet commented Mar 20, 2024

Fixed by #122720.

@joboet joboet closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

No branches or pull requests

5 participants