mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-17 11:26:40 +00:00
`replace_prefix` is currently implemented as a method but has no real relation to the struct it is implemented on. Turn it into a closure and move it into the only method from which it is called.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.