Make hidden type registration opt-in, so that each site can be reviewed on its own and we have the right defaults for trait solvers

This commit is contained in:
Oli Scherer
2023-02-10 16:42:53 +00:00
parent bda32a4023
commit 88a7b6803b
15 changed files with 51 additions and 26 deletions

View File

@@ -821,6 +821,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
self.infcx
.at(&obligation.cause, obligation.param_env)
// needed for tests/ui/type-alias-impl-trait/assoc-projection-ice.rs
.define_opaque_types(true)
.sup(obligation_trait_ref, expected_trait_ref)
.map(|InferOk { mut obligations, .. }| {
obligations.extend(nested);