Skip to content

Conversation

fmease
Copy link
Member

@fmease fmease commented Sep 17, 2025

  1. As a follow-up to PR Remove support for dyn* from the compiler #143036, remove DynKind entirely.
  2. Inside HIR ty lowering, consolidate modules dyn_compatibility and lint into dyn_trait
    • dyn_compatibility wasn't about dyn compatibility itself, it's about lowering trait object types
    • lint contained dyn-Trait-specific diagnostics+lints only

@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2025

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

changes to the core type system

cc @compiler-errors, @lcnr

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in exhaustiveness checking

cc @Nadrieril

@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2025

r? @jdonszelmann

rustbot has assigned @jdonszelmann.
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 PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 17, 2025
@fmease fmease added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Sep 17, 2025
let tcx = self.tcx();
let dummy_self = tcx.types.trait_object_dummy_self;

match syntax {
Copy link
Contributor

Choose a reason for hiding this comment

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

took me a while to understand that this match got moved out of prohibit_or_lint_bare_trait_object_ty and where the code from compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs went but this makes things a lot neater.

@jdonszelmann
Copy link
Contributor

jdonszelmann commented Sep 17, 2025

Took me a bit to review since this part of the compiler isn't my expertise so I wanted to take some time to do it thoroughly but in the end everything in this PR turned out rather trivial. Love the cleanups though!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 17, 2025

📌 Commit 34062b1 has been approved by jdonszelmann

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 Sep 17, 2025
fmease added a commit to fmease/rust that referenced this pull request Sep 18, 2025
Clean up `ty::Dynamic`

1. As a follow-up to PR rust-lang#143036, remove `DynKind` entirely.
2. Inside HIR ty lowering, consolidate modules `dyn_compatibility` and `lint` into `dyn_trait`
   * `dyn_compatibility` wasn't about dyn compatibility itself, it's about lowering trait object types
   * `lint` contained dyn-Trait-specific diagnostics+lints only
bors added a commit that referenced this pull request Sep 18, 2025
Rollup of 5 pull requests

Successful merges:

 - #146566 (Lint more overlapping assignments in MIR.)
 - #146645 (Cleanup `FnDecl::inner_full_print`)
 - #146664 (Clean up `ty::Dynamic`)
 - #146673 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 4))
 - #146694 (Remove ImplSubject)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 540fd20 into rust-lang:master Sep 18, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 18, 2025
rust-timer added a commit that referenced this pull request Sep 18, 2025
Rollup merge of #146664 - fmease:clean-up-dyn, r=jdonszelmann

Clean up `ty::Dynamic`

1. As a follow-up to PR #143036, remove `DynKind` entirely.
2. Inside HIR ty lowering, consolidate modules `dyn_compatibility` and `lint` into `dyn_trait`
   * `dyn_compatibility` wasn't about dyn compatibility itself, it's about lowering trait object types
   * `lint` contained dyn-Trait-specific diagnostics+lints only
@fmease fmease deleted the clean-up-dyn branch September 18, 2025 07:50
tautschnig added a commit to tautschnig/kani that referenced this pull request Sep 19, 2025
Relevant upstream PRs:
- rust-lang/rust#146664 (Clean up `ty::Dynamic`)
- rust-lang/rust#146728 (Clippy subtree update)

Resolves: model-checking#4368
github-merge-queue bot pushed a commit to model-checking/kani that referenced this pull request Sep 20, 2025
Relevant upstream PRs:
- rust-lang/rust#146664 (Clean up `ty::Dynamic`)
- rust-lang/rust#146728 (Clippy subtree update)

Resolves: #4368

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Co-authored-by: Zyad Hassan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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.

4 participants