Skip to content

Replace size_of intrinsic - #165246

Draft
dinosath wants to merge 2 commits into
rust-lang:mainfrom
dinosath:replace_sizeof
Draft

dinosath wants to merge 2 commits into
rust-lang:mainfrom
dinosath:replace_sizeof

Conversation

@dinosath

Copy link
Copy Markdown

@rustbot rustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 31, 2026
@rustbot

rustbot commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @oli-obk (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-gnu-next-trait-solver-polonius failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] build_script_build test:false 0.152
error[E0391]: cycle detected when evaluating type-level constant
    --> library/core/src/any.rs:731:34
     |
 731 |     pub(crate) data: [*const (); 16 / size_of::<*const ()>()],
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: ...which requires const-evaluating + checking `any::TypeId::data::{constant#0}`...
note: ...which requires const-evaluating + checking `any::TypeId::data::{constant#0}`...
    --> library/core/src/mem/mod.rs:383:5
     |
 383 |     <T as SizedTypeProperties>::SIZE
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires simplifying constant for the type system `mem::SizedTypeProperties::SIZE`...
---
     = note: ...which requires const-evaluating + checking `mem::SizedTypeProperties::SIZE`...
note: ...which requires caching mir of `mem::type_info::size_of` for CTFE...
    --> library/core/src/mem/type_info.rs:74:1
     |
  74 | pub(crate) fn size_of<T: Sized>() -> usize {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: ...which requires elaborating drops for `mem::type_info::size_of`...
     = note: ...which requires borrow-checking `mem::type_info::size_of`...
     = note: ...which requires promoting constants in MIR for `mem::type_info::size_of`...
     = note: ...which requires const checking `mem::type_info::size_of`...
     = note: ...which requires building MIR for `mem::type_info::size_of`...
     = note: ...which requires match-checking `mem::type_info::size_of`...
     = note: ...which requires type-checking `mem::type_info::size_of`...
note: ...which requires computing autoderef types for `[*const (); 16 / size_of::<*const ()>()]`...
    --> library/core/src/any.rs:731:34
     |
 731 |     pub(crate) data: [*const (); 16 / size_of::<*const ()>()],
     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: ...which again requires evaluating type-level constant, completing the cycle
     = note: cycle used when coherence checking all impls of trait `marker::Copy`
     = note: for more information, see <https://rustc-dev-guide.rust-lang.org/overview.html#queries> and <https://rustc-dev-guide.rust-lang.org/query.html>

For more information about this error, try `rustc --explain E0391`.
[RUSTC-TIMING] core test:false 5.323
error: could not compile `core` (lib) due to 1 previous error
Bootstrap failed while executing `build library --stage 2`

Important

For more information how to resolve CI failures of this job, visit this link.

@rust-bors

rust-bors Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #165563) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

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-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants