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:
@@ -286,7 +286,12 @@ fn project_and_unify_type<'cx, 'tcx>(
|
||||
);
|
||||
obligations.extend(new);
|
||||
|
||||
match infcx.at(&obligation.cause, obligation.param_env).eq(normalized, actual) {
|
||||
match infcx
|
||||
.at(&obligation.cause, obligation.param_env)
|
||||
// This is needed to support nested opaque types like `impl Fn() -> impl Trait`
|
||||
.define_opaque_types(true)
|
||||
.eq(normalized, actual)
|
||||
{
|
||||
Ok(InferOk { obligations: inferred_obligations, value: () }) => {
|
||||
obligations.extend(inferred_obligations);
|
||||
ProjectAndUnifyResult::Holds(obligations)
|
||||
|
||||
Reference in New Issue
Block a user