mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
be715d4685
Simplify `TypeFreshener` methods.
`freshen_{ty,const}` take a `Result` and just do a fold if the input is `Ok`. It's simpler to do those folds at the call site, and only call `freshen_{ty,const}` in the `Err` case. That way we can also avoid useless fold operations on the results of `new_{int,uint,float}`.
Also, make some `bug!` calls more concise.
r? `@lcnr`