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

Some rustc_transmute cleanups #137776

Merged
merged 6 commits into from
Mar 1, 2025

Conversation

nnethercote
Copy link
Contributor

A number of small things that can be removed.

r? @jswrenn

`TransmuteTypeEnv` only needs a `TyCtxt`, not an `InferCtxt`.
This was hiding some genuine sins, including unused arguments in
numerous functions/methods (incl. trait methods), and some unnecessary
computation.
By either removing the function, or change the attribute to something
more precise.
@rustbot rustbot 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Feb 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 28, 2025

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@nnethercote
Copy link
Contributor Author

Best reviewed one commit at a time.

@nnethercote
Copy link
Contributor Author

These commits modify the Cargo.lock file.

That is intentional. The PR removes some unnecessary crate dependencies.

@jswrenn
Copy link
Member

jswrenn commented Feb 28, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Feb 28, 2025

📌 Commit b0530c9 has been approved by jswrenn

It is now in the queue for this repository.

@bors bors 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 Feb 28, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 1, 2025
…ps, r=jswrenn

Some `rustc_transmute` cleanups

A number of small things that can be removed.

r? `@jswrenn`
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#136503 (Tweak output of const panic diagnostic)
 - rust-lang#137390 (tests: fix up new test for nocapture -> capture(none) change)
 - rust-lang#137617 (Introduce `feature(generic_const_parameter_types)`)
 - rust-lang#137719 (Add missing case explanation for doc inlined re-export of doc hidden item)
 - rust-lang#137763 (Use `mk_ty_from_kind` a bit less, clean up lifetime handling in borrowck)
 - rust-lang#137769 (Do not yeet `unsafe<>` from type when formatting unsafe binder)
 - rust-lang#137776 (Some `rustc_transmute` cleanups)
 - rust-lang#137800 (Remove `ParamEnv::without_caller_bounds`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b6c1b63 into rust-lang:master Mar 1, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 1, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2025
Rollup merge of rust-lang#137776 - nnethercote:rustc_transmute-cleanups, r=jswrenn

Some `rustc_transmute` cleanups

A number of small things that can be removed.

r? ``@jswrenn``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 18, 2025
…rcote

Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute`

`Transition` is only used in the `Transitions::insert` in test after rust-lang#137776

Detected by rust-lang#128637
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
Rollup merge of rust-lang#138644 - mu001999-contrib:add-cfg, r=nnethercote

Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute`

`Transition` is only used in the `Transitions::insert` in test after rust-lang#137776

Detected by rust-lang#128637
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants