Why does Iterator::by_ref require Self: Sized?

1 · Users Rust Lang · May 26, 2026, 11:52 a.m.
Summary
This blog post discusses the requirement of `Self: Sized` in the `Iterator::by_ref` function of Rust. The author explores why it necessitates a reference to a mutable self (`&mut Self`), which is always considered sized, raising the question of the necessity of this restriction and offering insights into Rust's type system.