Skip to content

[WIP] Polymorphization - #160300

Draft
camelid wants to merge 2 commits into
rust-lang:mainfrom
camelid:poly
Draft

camelid wants to merge 2 commits into
rust-lang:mainfrom
camelid:poly

Conversation

@camelid

@camelid camelid commented Jul 31, 2026

Copy link
Copy Markdown
Member

No description provided.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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 Jul 31, 2026
For now it's fine to just check if conflicting CLI flags are passed.
Though it may still be good to ensure correctness by construction for
layouts (wrt randomization) in the future.
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
fmt: checked 7313 files
tidy check
tidy [rustdoc_json (src)]: `rustdoc-json-types` modified, checking format version
tidy: Skipping binary file check, read-only filesystem
tidy [style (compiler)]: /checkout/compiler/rustc_codegen_ssa/src/mir/mod.rs:217: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this is a hacky temporary thing, remove or make proper
tidy [style (compiler)]: /checkout/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs:452: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: should we include the layout as well?
tidy [style (compiler)]: /checkout/compiler/rustc_middle/src/ty/instance.rs:997: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this and/or is_ty_param_polymorphizable should probably be queries,
tidy [style (compiler)]: /checkout/compiler/rustc_middle/src/ty/instance.rs:1010: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: is there any way this is visible from generic user code that doesn't use intrinsics?
tidy [style (compiler)]: /checkout/compiler/rustc_middle/src/ty/instance.rs:1016: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this is horrifically hacky, need better solution. probably lang items,
tidy [style (compiler)]: /checkout/compiler/rustc_middle/src/ty/instance.rs:1111: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: maybe disqualify T: 'static since that's needed for TypeId on stable?
tidy [style (compiler)]: /checkout/compiler/rustc_middle/src/ty/layout.rs:1028: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: probably need to support this
tidy [style (compiler)]: /checkout/compiler/rustc_middle/src/ty/util.rs:1565: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this should be changed once Erased types can have drop impls
tidy [style (compiler)]: /checkout/compiler/rustc_codegen_llvm/src/type_of.rs:105: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this used to special-case on ty.is_erased(). now it doesn't do that (good!)
tidy [style (compiler)]: /checkout/compiler/rustc_trait_selection/src/traits/select/mod.rs:2140: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this is a bit sketchy since we checked sizedness of the layout before creating ty::Erased
tidy [style (compiler)]: /checkout/compiler/rustc_public/src/unstable/convert/stable/ty.rs:498: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: should add new rustc_public::TyKind variant probably
tidy [style (compiler)]: /checkout/compiler/rustc_public/src/unstable/convert/stable/ty.rs:499: the `todo!` macro is used for tasks that should be done before merging a PR.
If you want to panic here, use `panic!`, `unimplemented!`, `unreachable!`, `rustc_middle::bug!` or an assertion
tidy [style (compiler)]: /checkout/compiler/rustc_monomorphize/src/collector.rs:1100: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: polymorphize should not be ad hoc like this
tidy [style (compiler)]: /checkout/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs:739: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
tidy [style (compiler)]: /checkout/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs:740: the `todo!` macro is used for tasks that should be done before merging a PR.
If you want to panic here, use `panic!`, `unimplemented!`, `unreachable!`, `rustc_middle::bug!` or an assertion
tidy [style (compiler)]: /checkout/compiler/rustc_symbol_mangling/src/v0.rs:332: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this hashing is a really hacky temporary approach
tidy [style (compiler)]: /checkout/compiler/rustc_symbol_mangling/src/v0.rs:551: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: this needs more thought and design work
tidy [style (compiler)]: /checkout/compiler/rustc_symbol_mangling/src/lib.rs:147: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: not the right place for this probably
tidy [style (compiler)]: /checkout/compiler/rustc_symbol_mangling/src/lib.rs:367: TODO is used for tasks that should be done before merging a PR;
If you want to leave a message in the codebase use FIXME
 >> TODO: handle erased params in demangling somehow
tidy [style (compiler)]: FAIL
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.12' and 'venv'
Requirement already satisfied: pip in ./build/venv/lib/python3.12/site-packages (24.0)
Collecting pip
  Downloading pip-26.2.1-py3-none-any.whl.metadata (4.6 kB)
---
typechecking javascript files
tidy: The following check failed: style (compiler)
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1665
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy --root-path=/checkout --cargo-path=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo --output-dir=/checkout/obj/build --concurrency=4 --npm-path=/node/bin/yarn --ci=true --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1627:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1747:29

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:02:43
  local time: Mon Sep 28 20:01:17 UTC 2026
  network time: Mon, 28 Sep 2026 20:01:17 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

3 participants