-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Clean up ty::Dynamic
#146664
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
Clean up ty::Dynamic
#146664
Conversation
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 changes to the core type system Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_codegen_ssa 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 has assigned @jdonszelmann. Use |
let tcx = self.tcx(); | ||
let dummy_self = tcx.types.trait_object_dummy_self; | ||
|
||
match syntax { |
There was a problem hiding this comment.
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.
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 |
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
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
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
Relevant upstream PRs: - rust-lang/rust#146664 (Clean up `ty::Dynamic`) - rust-lang/rust#146728 (Clippy subtree update) Resolves: model-checking#4368
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]>
dyn*
from the compiler #143036, removeDynKind
entirely.dyn_compatibility
andlint
intodyn_trait
dyn_compatibility
wasn't about dyn compatibility itself, it's about lowering trait object typeslint
contained dyn-Trait-specific diagnostics+lints only