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

Use size_of from the prelude instead of imported #19288

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

thaliaarchi
Copy link
Contributor

Use std::mem::{size_of, size_of_val, align_of, align_of_val} from the prelude instead of importing or qualifying them.

These functions were added to all preludes in Rust 1.80.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 5, 2025
@thaliaarchi thaliaarchi force-pushed the use-prelude-size-of branch from 18d9ac0 to 11e7d71 Compare March 5, 2025 08:04
@thaliaarchi thaliaarchi force-pushed the use-prelude-size-of branch from 11e7d71 to 2f90be3 Compare March 5, 2025 08:30
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.

These functions were added to all preludes in Rust 1.80.
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

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

Thanks!

@Veykril Veykril enabled auto-merge March 5, 2025 08:57
@Veykril Veykril added this pull request to the merge queue Mar 5, 2025
Merged via the queue into rust-lang:master with commit b139e21 Mar 5, 2025
9 checks passed
@thaliaarchi thaliaarchi deleted the use-prelude-size-of branch March 5, 2025 09:40
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants