mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
c4c654f422
Use .name_str() to format primitive types in error messages This pull request fixes #84976. The problem described there is caused by this code https://github.com/rust-lang/rust/blob/506e75cbf8cb5305e49a41326307004ca3976029/compiler/rustc_middle/src/ty/error.rs#L161-L166 using `Debug` formatting (`{:?}`), while the proper solution is to call `name_str()` of `ty::IntTy`, `ty::UintTy` and `ty::FloatTy`, respectively.
For more information about how rustc works, see the rustc dev guide.