Test that TAIT and RPIT are in sync
This commit is contained in:
parent
53c96ed528
commit
6596e9dfcf
4 changed files with 33 additions and 2 deletions
|
@ -772,6 +772,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
// Note: this check is pessimistic, as the inference type could be matched with something other
|
||||
// than the opaque type, but then we need a new `TypeRelation` just for this specific case and
|
||||
// can't re-use `sup` below.
|
||||
// See src/test/ui/impl-trait/hidden-type-is-opaque.rs and
|
||||
// src/test/ui/impl-trait/hidden-type-is-opaque-2.rs for examples that hit this path.
|
||||
if formal_ret.has_infer_types() {
|
||||
for ty in ret_ty.walk() {
|
||||
if let ty::subst::GenericArgKind::Type(ty) = ty.unpack() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue