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
|
@ -128,6 +128,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
|
|||
{
|
||||
self.infcx
|
||||
.at(cause, param_env)
|
||||
.define_opaque_types(true)
|
||||
.eq_exp(a_is_expected, a, b)
|
||||
.map(|infer_ok| self.register_infer_ok_obligations(infer_ok))
|
||||
}
|
||||
|
@ -141,6 +142,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
|
|||
) -> Result<(), TypeError<'tcx>> {
|
||||
self.infcx
|
||||
.at(cause, param_env)
|
||||
.define_opaque_types(true)
|
||||
.eq(expected, actual)
|
||||
.map(|infer_ok| self.register_infer_ok_obligations(infer_ok))
|
||||
}
|
||||
|
@ -155,6 +157,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
|
|||
) -> Result<(), TypeError<'tcx>> {
|
||||
self.infcx
|
||||
.at(cause, param_env)
|
||||
.define_opaque_types(true)
|
||||
.sup(expected, actual)
|
||||
.map(|infer_ok| self.register_infer_ok_obligations(infer_ok))
|
||||
}
|
||||
|
@ -169,6 +172,7 @@ impl<'a, 'tcx> ObligationCtxt<'a, 'tcx> {
|
|||
) -> Result<(), TypeError<'tcx>> {
|
||||
self.infcx
|
||||
.at(cause, param_env)
|
||||
.define_opaque_types(true)
|
||||
.sup(expected, actual)
|
||||
.map(|infer_ok| self.register_infer_ok_obligations(infer_ok))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue