-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE: expected usize, got UnevaluatedConst
#116186
Comments
Regression in nightly-2021-09-01 found 9 bors merge commits in the specified range |
return unfixed len if pat has reported error - Fixes rust-lang#116186 - Fixes rust-lang#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.
return unfixed len if pat has reported error - Fixes rust-lang#116186 - Fixes rust-lang#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.
Rollup merge of rust-lang#117046 - bvanjoi:fix-116186, r=oli-obk return unfixed len if pat has reported error - Fixes rust-lang#116186 - Fixes rust-lang#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.
Code
rustc --edition=2018
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: