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 #14355

Merged
merged 1 commit 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.

changelog: none

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
Copy link
Collaborator

rustbot commented Mar 5, 2025

r? @Centri3

rustbot has assigned @Centri3.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 5, 2025
Copy link
Member

@Centri3 Centri3 left a comment

Choose a reason for hiding this comment

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

Each individual case here is fine but you should be careful removing qualified paths like this. Qualified paths in suggestions are usually intentional and necessary to remove ambiguity (especially in regards to MSRV).

@Centri3 Centri3 added this pull request to the merge queue Mar 5, 2025
Merged via the queue into rust-lang:master with commit ad633be Mar 5, 2025
11 checks passed
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