Skip to content

Issue-141806: Remove sizedness_fast_path in fulfill.rs #145492

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

Closed
wants to merge 6 commits into from

Conversation

Shunpoco
Copy link
Contributor

@Shunpoco Shunpoco commented Aug 16, 2025

Context

Fix #141806

If Sized type doesn't exist, the ICE happens. This ICE is from sizedness_fast_path() call in FulfillProcessor.process_abligation.
Originally the function call was added for performance improvement in #139577 .

Change

  • Remove the function call
  • Add test for the ICE

It solves rust-lang#141806.
sizedness_fast_path in FulfillProcessor.process_obligation
causes the panic if the Sized type doesn't exist.

Signed-off-by: Shunpoco <[email protected]>
@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 Aug 16, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs#current stdout ----

error in revision `current`: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "current" "--check-cfg" "cfg(test,FALSE,current,next,current_sized_hierarchy,next_sized_hierarchy)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/sized-hierarchy/incomplete-inference-issue-143992.current" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type=lib"
stdout: none
--- stderr -------------------------------
error[E0308]: mismatched types
##[error]  --> /checkout/tests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs:30:28
   |
LL |     let _x = T::Assoc::new(());
   |              ------------- ^^ expected `[u32; 1]`, found `()`
   |              |
   |              arguments to this function are incorrect
   |
note: associated function defined here
  --> /checkout/tests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs:21:8
   |
LL |     fn new(r: R) -> R {
   |        ^^^ ----

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.

@compiler-errors
Copy link
Member

This solution does not look correct and also has a performance implication. This needs a lot more detailed explanation for why the ICE occurs in the first place.

@Shunpoco
Copy link
Contributor Author

Yes, at first I thought that the problem is solved by deleting the block, but the actual problem is much deeper.
I will close this PR at the moment, thanks for the comment

@Shunpoco Shunpoco closed this Aug 18, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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:called Result::unwrap() on an Err value: NoSolution
4 participants