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

Document layout SemVer compatibility. #12169

Merged
merged 10 commits into from
Aug 18, 2023
Prev Previous commit
Next Next commit
Apply changes from review from obi1kenobi.
  • Loading branch information
ehuss committed Aug 18, 2023
commit 9e274d07bd8482f91d0ec06bdbd2497a46ae8b8c
3 changes: 1 addition & 2 deletions src/doc/src/reference/semver.md
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ fn main() {
<a id="repr-align-remove"></a>
#### Major: Removing `repr(align)` from a struct, union, or enum

It is a breaking change to remove `repr(align)` from a struct, union, or enum.
It is a breaking change to remove `repr(align)` from a struct, union, or enum, if their layout was well-defined.
This may change the alignment or layout that external crates are relying on.

This change should be safe to make if the type is not well-defined as discussed in [type layout](#type-layout) (such as having any private fields and having an undocumented alignment).
Expand Down Expand Up @@ -967,7 +967,6 @@ extern "C" {
fn main() {}
```


### Major: adding a private struct field when all current fields are public {#struct-add-private-field-when-public}

When a private field is added to a struct that previously had all public fields,
Expand Down