Skip to content

crate: change padding fields to use Padding - #5435

Open
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:add-padding-remaining
Open

crate: change padding fields to use Padding#5435
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:add-padding-remaining

Conversation

@dybucc

@dybucc dybucc commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Description

Attempts to change whichever padding fields didn’t already use our custom Padding type. Closes #1453.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • Commit messages permalink to headers for added or changed API
  • Placeholder or unstable values like *LAST or *MAX have the standard doc comment
  • Tested locally (cargo test -p libc-test --target mytarget); especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

Change padding fields that were still using raw types to be wrapped
instead in the `Padding` type. The following command was used to search
across the codebase, alongside manually checking each of the files where
some such result came up.

```
rg -g "src/**/*.rs" -s -n -e "pad|res(erve(d)?)?|unuse(d)?|fill(er)?|spare"
```
@rustbot

rustbot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an OpenBSD module

cc @semarie

Some changes occurred in a solarish module

cc @jclulow, @pfmooney

Some changes occurred in an Android module

cc @maurer

Some changes occurred in a NetBSD-like module

cc @semarie

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you split this into separate commits?

  1. Changes to fields that are already private
  2. Changes to fields that are deprecated
  3. Changes to fields that are public (preferably a separate PR for labels)

That way I can backport the first two but hold off on the last one. I know our policy technically does allow us to change them, but some of these are pretty popular structs so I'd like to be a bit cautious anyway.

View changes since this review

@rustbot

rustbot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot

rustbot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #5173) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrap padding fields in Padding(MaybeUninit<T>)

3 participants