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

Add manual_slice_size_calculation applicable suggestion #10661

Merged
merged 3 commits into from Apr 17, 2023

Conversation

timvisee
Copy link
Contributor

Continuation of #10659 (comment).

This adds applicable suggestions to the manual_slice_size_calculation lint:

error: manual slice size calculation
  --> $DIR/manual_slice_size_calculation.rs:11:13
   |
LL |     let _ = s_i32.len() * size_of::<i32>(); // WARNING
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(s_i32)`
   |
   = note: `-D clippy::manual-slice-size-calculation` implied by `-D warnings`

changelog: [manual_slice_size_calculation]: add machine applicable suggestion

@rustbot
Copy link
Collaborator

rustbot commented Apr 17, 2023

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 17, 2023
@timvisee
Copy link
Contributor Author

r? @Manishearth

@rustbot rustbot assigned Manishearth and unassigned Alexendoo Apr 17, 2023
@timvisee timvisee force-pushed the manual-slice-size-calc-suggestion branch 2 times, most recently from f92c8f9 to 54a0a52 Compare April 17, 2023 18:53
@timvisee timvisee marked this pull request as draft April 17, 2023 18:58
@timvisee timvisee force-pushed the manual-slice-size-calc-suggestion branch from 54a0a52 to 9c38f5c Compare April 17, 2023 19:06
@timvisee timvisee force-pushed the manual-slice-size-calc-suggestion branch from 9c38f5c to 7d558ea Compare April 17, 2023 19:14
@timvisee timvisee force-pushed the manual-slice-size-calc-suggestion branch from 7d558ea to a2580db Compare April 17, 2023 19:20
@timvisee timvisee marked this pull request as ready for review April 17, 2023 19:21
@Manishearth
Copy link
Member

@bors r+

thanks!

@bors
Copy link
Collaborator

bors commented Apr 17, 2023

📌 Commit a2580db has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Apr 17, 2023

⌛ Testing commit a2580db with merge 203c909...

@bors
Copy link
Collaborator

bors commented Apr 17, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 203c909 to master...

@bors bors merged commit 203c909 into rust-lang:master Apr 17, 2023
5 checks passed
@timvisee timvisee mentioned this pull request May 9, 2023
5 tasks
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.

None yet

5 participants