Replace some `std::iter::repeat` with `str::repeat` I noticed that there were some instances where `std::iter::repeat` would be used to repeat a string or a char to take a specific count of it and then collect it into a `String` when `str::repeat` is actually much faster and better for that. See also: https://github.com/rust-lang/rust-clippy/issues/7260.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.