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:
parent
bda32a4023
commit
88a7b6803b
15 changed files with 51 additions and 26 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue