-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Normalize consts' tys when relating with adt_const_params
#97709
Normalize consts' tys when relating with adt_const_params
#97709
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
r? @oli-obk |
let a_ty; | ||
let b_ty; | ||
if relation.tcx().features().adt_const_params { | ||
a_ty = tcx.normalize_erasing_regions(relation.param_env(), a.ty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe normalize_erasing_regions
can panic if normalization fails. Is is guaranteed that this succeeds here (otherwise you might want to use try_normalize_erasing_regions
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only way it can fail is if there were other errors already. I'd rather address the ICE here if that happens and know about it than silently assume normalization can fail here.
@bors r+ rollup |
📌 Commit 27af8e4 has been approved by |
…am-ty, r=oli-obk Normalize consts' tys when relating with `adt_const_params` Fixes rust-lang#97007
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#97709 (Normalize consts' tys when relating with `adt_const_params`) - rust-lang#97875 (Remove the `infer_static_outlives_requirements` feature) - rust-lang#97960 (interpret: unify offset_from check with offset check) - rust-lang#97999 (Make `type_changing_struct_update` no longer an incomplete feature) - rust-lang#98043 (Remove unnecessary `to_string` and `String::new`) - rust-lang#98044 ([issues:97981] del unrelated comment) - rust-lang#98049 (Document an edge case of `str::split_once`) - rust-lang#98050 (Add some more regression tests for rust-lang#67945) - rust-lang#98054 (Fix error message for `download-ci-llvm`) - rust-lang#98057 (Update miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #97007