Skip to content

Fix unspecified transmute between slice types - #5440

Open
weiznich wants to merge 1 commit into
rust-lang:mainfrom
GiGainfosystems:fix_unspecified_transmute
Open

Fix unspecified transmute between slice types#5440
weiznich wants to merge 1 commit into
rust-lang:mainfrom
GiGainfosystems:fix_unspecified_transmute

Conversation

@weiznich

Copy link
Copy Markdown

The layout of slices is currently not specified in Rust. This PR replaces a transmute between slices of different types with the equivalent pointer cast to keep all involved behaviour specified.

@rustbot

This comment has been minimized.

@weiznich
weiznich force-pushed the fix_unspecified_transmute branch from ec04665 to c8fcd3c Compare August 26, 2026 12:25
@tgross35

Copy link
Copy Markdown
Member

The change LGTM but could you file this against the main branch? That's what all PRs should target, libc-0.2 doesn't get updated until right before a release.

The layout of slices is currently not specified in Rust. This PR
replaces a `transmute` between slices of different types with the
equivalent pointer cast to keep all involved behaviour specified.
@weiznich
weiznich force-pushed the fix_unspecified_transmute branch from c8fcd3c to b02a6a4 Compare August 27, 2026 06:49
@rustbot

rustbot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

Some changes occurred in a solarish module

cc @jclulow, @pfmooney

Some changes occurred in an OpenBSD module

cc @semarie

@weiznich

Copy link
Copy Markdown
Author

I rebased the PR and changed the base branch. Sorry for the noise from the bot :(

@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.

Sorry for the confusion, thank you!

View changes since this review

@tgross35
tgross35 enabled auto-merge August 27, 2026 06:52
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Aug 27, 2026
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.

3 participants