Skip to content

Fix some unnecessary casts - #118147

Merged
bors merged 1 commit into
rust-lang:masterfrom
Noratrieb:no-redundant-casts
Nov 22, 2023
Merged

Fix some unnecessary casts#118147
bors merged 1 commit into
rust-lang:masterfrom
Noratrieb:no-redundant-casts

Conversation

@Noratrieb

Copy link
Copy Markdown
Member

x clippy compiler -Aclippy::all -Wclippy::unnecessary_cast --fix with some manual review to ensure every fix is correct.

@rustbot

Copy link
Copy Markdown
Collaborator

r? @wesleywiser

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

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 21, 2023
@Noratrieb
Noratrieb requested review from WaffleLapkin and removed request for WaffleLapkinNovember 21, 2023 20:47
@rust-log-analyzer

This comment has been minimized.

`x clippy compiler -Aclippy::all -Wclippy::unnecessary_cast --fix`
with some manual review to ensure every fix is correct.
@matthiaskrgr

matthiaskrgr commented Nov 21, 2023

Copy link
Copy Markdown
Member

iirc there were problems on different architectures with these :/

@WaffleLapkin

Copy link
Copy Markdown
Member

@matthiaskrgr do you have a reference? I don't really see how any of those can cause problems on diff. arches...

@matthiaskrgr

Copy link
Copy Markdown
Member

It's probably buried in some year-old pr, I could not find anything right now. May also be that the code has already changed in the meantime or clippy got better somehow , CI will make the final call I guess..

@WaffleLapkin

WaffleLapkin commented Nov 21, 2023

Copy link
Copy Markdown
Member

Okay, well, r=me with green CI then

@Noratrieb

Copy link
Copy Markdown
MemberAuthor

iirc there were problems on different architectures with these :/

Correct, some "redundant" casts are necessary. I checked the source and dest types manually in the source and only included the actually redundant casts here.

@Noratrieb

Copy link
Copy Markdown
MemberAuthor

CI is partially green, good enough for me 😈
@bors r=WaffleLapkin

@bors

bors commented Nov 21, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit c089a16 has been approved by WaffleLapkin

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 21, 2023
@matthiaskrgr

Copy link
Copy Markdown
Member

I was not referring to the pre-merge ci 😅
86u245

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 21, 2023
…ffleLapkin
Fix some unnecessary casts
`x clippy compiler -Aclippy::all -Wclippy::unnecessary_cast --fix` with some manual review to ensure every fix is correct.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2023
…mpiler-errors
Rollup of 6 pull requests
Successful merges:
- rust-lang#118012 (Add support for global allocation in smir)
- rust-lang#118013 (Enable Rust to use the EHCont security feature of Windows)
- rust-lang#118100 (Enable profiler in dist-powerpc64-linux)
- rust-lang#118142 (Tighten up link attributes for llvm-wrapper bindings)
- rust-lang#118147 (Fix some unnecessary casts)
- rust-lang#118161 (Allow defining opaques in `check_coroutine_obligations`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 040151a into rust-lang:masterNov 22, 2023
@rustbotrustbot added this to the 1.76.0 milestone Nov 22, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2023
Rollup merge of rust-lang#118147 - Nilstrieb:no-redundant-casts, r=WaffleLapkin
Fix some unnecessary casts
`x clippy compiler -Aclippy::all -Wclippy::unnecessary_cast --fix` with some manual review to ensure every fix is correct.
@Noratrieb
Noratrieb deleted the no-redundant-casts branch November 23, 2023 05:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@Noratrieb@rustbot@rust-log-analyzer@matthiaskrgr@WaffleLapkin@bors@wesleywiser