Closed
Description
I tried this code:
pub trait Iter {
type Item;
}
impl<'x, I> Iter for I
where
I: IntoIterator<Item = &'x ()>,
{
type Item = &'x ();
}
pub struct Map<I>(I)
where
I: Iter,
I::Item: 'static;
pub fn test_borrowck<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str {
s
}
fn main() {}
I expected to see it work.
Instead, it did not.
Meta
1.85 + beta + nightly for Feb 27, 2025