Auto merge of #95519 - oli-obk:tait_ub2, r=compiler-errors
Enforce well formedness for type alias impl trait's hidden type fixes #84657 This was not an issue with return-position-impl-trait because the generic bounds of the function are the same as those of the opaque type, and the hidden type must already be well formed within the function. With type-alias-impl-trait the hidden type could be defined in a function that has *more* lifetime bounds than the type alias. This is fine, but the hidden type must still be well formed without those additional bounds.
This commit is contained in:
commit
f4a7ce997a
7 changed files with 112 additions and 3 deletions
|
@ -144,7 +144,7 @@ impl<'a, K, V> IntoIterator for &'a VecMap<K, V> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, K, V> IntoIterator for &'a mut VecMap<K, V> {
|
||||
impl<'a, K: 'a, V: 'a> IntoIterator for &'a mut VecMap<K, V> {
|
||||
type Item = (&'a K, &'a mut V);
|
||||
type IntoIter = impl Iterator<Item = Self::Item>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue