]> git.lizzy.rs Git - rust.git/commit - compiler/rustc_codegen_cranelift/src/common.rs
Rollup merge of #107286 - compiler-errors:new-solver-deny-infers, r=lcnr
authorMatthias Krüger <matthias.krueger@famsik.de>
Thu, 26 Jan 2023 05:15:29 +0000 (06:15 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Jan 2023 05:15:29 +0000 (06:15 +0100)
commitdd08f35e87d51ccc5055cb331834b2736040ad8c
treed9ccf54402dd1abcb80d3663dccb176e2ee6da34
parent5be2f51428dd2daeafc582d5c06328e21f2fd5a9
parent0f24e11ef5cd0a8363ae1791cee3f96de3d0845c
Rollup merge of #107286 - compiler-errors:new-solver-deny-infers, r=lcnr

ICE in new solver if we see an inference variable

By construction, we do not expect to see any `ty::Infer(ty::TyVar(_))` inference types in the solver (we treat this as ambiguous, since we need to be able to structurally resolve the self type at least one layer to assemble candidates for it). Additionally, since we're doing no freshening, we also don't expect to see any fresh vars of any kind in the solver.

Let's make that an ICE so we can catch any mistakes.

When #107282 lands, we should also ICE there too if we see a non-int/float infer.

r? `@lcnr`
compiler/rustc_trait_selection/src/solve/assembly.rs
compiler/rustc_trait_selection/src/solve/project_goals.rs
compiler/rustc_trait_selection/src/solve/trait_goals/structural_traits.rs