Skip to content

unsize coercion: handle pointers behind OperandValue::Ref - #165535

Draft
cclfmht wants to merge 1 commit into
rust-lang:mainfrom
cclfmht:issue-162861
Draft

cclfmht wants to merge 1 commit into
rust-lang:mainfrom
cclfmht:issue-162861

Conversation

@cclfmht

@cclfmht cclfmht commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #162861.

It is possible for a pointer to be placed on memory due to C ABI, for example, #[repr(C)] struct Ptr<T>(Box<T>). This handles such cases in codegen_rvalue_operand.

It is possible for a pointer to be placed on memory due to C ABI, for
example, `#[repr(C)] struct Ptr<T>(Box<T>)`. This handles such cases in
`codegen_rvalue_operand`.
@rustbot rustbot added 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. labels Nov 6, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
test [crashes] tests/crashes/93182.rs ... ok
test [crashes] tests/crashes/invalid-niche-discriminant.rs#normal ... ignored, ignored if rustc wasn't built with debug assertions
test [crashes] tests/crashes/invalid-niche-discriminant.rs#with_delayed ... ignored, ignored if rustc wasn't built with debug assertions
test [crashes] tests/crashes/94846.rs ... ok
2026-11-06T06:16:22.249883Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/54888.rs ... FAILED
test [crashes] tests/crashes/98322.rs ... ok
test [crashes] tests/crashes/project-to-simd-array-field.rs ... ok
test [crashes] tests/crashes/reborrow/malformed-marker-coerce-shared-issue-156309.rs ... ok

failures:

---- [crashes] tests/crashes/54888.rs stdout ----

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/54888.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:16:18:
fatal error
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- [crashes] tests/crashes/54888.rs stdout end ----

Important

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

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

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: OperandValue cannot be a pointer

3 participants