-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Handle infer vars in anon consts on stable #132971
Conversation
ConstKind::Expr(_) => { | ||
bug!("Normalization of `ty::ConstKind::Expr` is unimplemented") | ||
} |
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.
Unrelated change: just wanted a better ICE message here so that it's easier to tell that any ICEs from here are caused by generic_const_exprs
not some problem with not calling normalize here (#132960). I can split this out if you want but it felt a little silly to make a separate PR just to change an ICE message when I already have to make a PR to make a follow up change to the previous PR.
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.
.
@bors r+ rollup |
…ts, r=compiler-errors Handle infer vars in anon consts on stable Fixes rust-lang#132955 Diagnostics will sometimes try to replace generic parameters with inference variables in failing goals. This means that if we have some failing goal with an array repeat expr count anon const in it, we will wind up with some `ty::ConstKind::Unevaluated(anon_const_def, [?x])` during diagnostics which will then ICE if we do not handle inference variables correctly on stable when normalizing type system consts. r? `@compiler-errors`
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#132709 (optimize char::to_digit and assert radix is at least 2) - rust-lang#132842 (ABI checks: add support for tier2 arches) - rust-lang#132965 (allow CFGuard on windows-gnullvm) - rust-lang#132967 (fix REGISTRY_USERNAME to reuse cache between auto and pr jobs) - rust-lang#132971 (Handle infer vars in anon consts on stable) - rust-lang#132979 (use `--exact` on `--skip` to avoid unintended substring matches) r? `@ghost` `@rustbot` modify labels: rollup
…ts, r=compiler-errors Handle infer vars in anon consts on stable Fixes rust-lang#132955 Diagnostics will sometimes try to replace generic parameters with inference variables in failing goals. This means that if we have some failing goal with an array repeat expr count anon const in it, we will wind up with some `ty::ConstKind::Unevaluated(anon_const_def, [?x])` during diagnostics which will then ICE if we do not handle inference variables correctly on stable when normalizing type system consts. r? ``@compiler-errors``
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#132709 (optimize char::to_digit and assert radix is at least 2) - rust-lang#132842 (ABI checks: add support for tier2 arches) - rust-lang#132965 (allow CFGuard on windows-gnullvm) - rust-lang#132967 (fix REGISTRY_USERNAME to reuse cache between auto and pr jobs) - rust-lang#132971 (Handle infer vars in anon consts on stable) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#132709 (optimize char::to_digit and assert radix is at least 2) - rust-lang#132842 (ABI checks: add support for tier2 arches) - rust-lang#132965 (allow CFGuard on windows-gnullvm) - rust-lang#132967 (fix REGISTRY_USERNAME to reuse cache between auto and pr jobs) - rust-lang#132971 (Handle infer vars in anon consts on stable) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#132709 (optimize char::to_digit and assert radix is at least 2) - rust-lang#132842 (ABI checks: add support for tier2 arches) - rust-lang#132965 (allow CFGuard on windows-gnullvm) - rust-lang#132967 (fix REGISTRY_USERNAME to reuse cache between auto and pr jobs) - rust-lang#132971 (Handle infer vars in anon consts on stable) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#131304 (float types: move copysign, abs, signum to libcore) - rust-lang#132907 (Change intrinsic declarations to new style) - rust-lang#132971 (Handle infer vars in anon consts on stable) - rust-lang#133003 (Make `CloneToUninit` dyn-compatible) - rust-lang#133004 (btree: simplify the backdoor between set and map) - rust-lang#133008 (update outdated comment about test-float-parse) - rust-lang#133012 (Add test cases for rust-lang#125918) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132971 - BoxyUwU:handle_infers_in_anon_consts, r=compiler-errors Handle infer vars in anon consts on stable Fixes rust-lang#132955 Diagnostics will sometimes try to replace generic parameters with inference variables in failing goals. This means that if we have some failing goal with an array repeat expr count anon const in it, we will wind up with some `ty::ConstKind::Unevaluated(anon_const_def, [?x])` during diagnostics which will then ICE if we do not handle inference variables correctly on stable when normalizing type system consts. r? ```@compiler-errors```
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#131304 (float types: move copysign, abs, signum to libcore) - rust-lang#132907 (Change intrinsic declarations to new style) - rust-lang#132971 (Handle infer vars in anon consts on stable) - rust-lang#133003 (Make `CloneToUninit` dyn-compatible) - rust-lang#133004 (btree: simplify the backdoor between set and map) - rust-lang#133008 (update outdated comment about test-float-parse) - rust-lang#133012 (Add test cases for rust-lang#125918) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #132955
Diagnostics will sometimes try to replace generic parameters with inference variables in failing goals. This means that if we have some failing goal with an array repeat expr count anon const in it, we will wind up with some
ty::ConstKind::Unevaluated(anon_const_def, [?x])
during diagnostics which will then ICE if we do not handle inference variables correctly on stable when normalizing type system consts.r? @compiler-errors