about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-10-23 22:26:30 +0200
committerGitHub <noreply@github.com>2023-10-23 22:26:30 +0200
commit7e607e8e32dd5bc0ac61a3c24267f435e8d6a070 (patch)
treea0059924d58ef8b21f96f4b803139d25eab6e9c6 /tests/codegen/src-hash-algorithm
parent8af4a3f9cd222afc708c3ed4e6b2cb6d5a5cd849 (diff)
parent6de40abc890ef1f9d89f36f4309695de19b60d5e (diff)
downloadrust-7e607e8e32dd5bc0ac61a3c24267f435e8d6a070.tar.gz
rust-7e607e8e32dd5bc0ac61a3c24267f435e8d6a070.zip
Rollup merge of #117046 - bvanjoi:fix-116186, r=oli-obk
return unfixed len if pat has reported error

- Fixes #116186
- Fixes #113021

This issue arises due to the creation of a fixed-length pattern, as a result of the mir body corruption. The corruption taints `tcx.eval_to_allocation_raw`, causing it to return `AlreadyReported`. Consequently, this prevents `len.try_eval_target_usize` from evaluating correctly and returns `None`. Lastly, it results in the return of `[usize; min_len]`.

To rectify this issue, my approach is that to return unfixed when encountering `ErrorHandled::Reported`. Additionally, in instances of `ErrorHandled::TooGeneric`, the previous logic has been reinstated.
Diffstat (limited to 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions