Auto merge of #52244 - glandium:issue52097, r=estebank
Don't display default generic parameters in diagnostics that compare types In errors like: ``` expected type: `RawVec<foo, Global>` found type: `foo` ``` `RawVec` being defined as `RawVec<T, A: Alloc = Global>`, the error is better written as ``` expected type: `RawVec<foo>` found type: `foo` ``` In fact, that is already what happens when `foo` is not an ADT, because in that case, the diagnostic handler doesn't try to highlight something, and just uses the `Display` trait instead of its own logic. e.g. ``` expected type: `RawVec<usize>` found type: `usize` ```
Showing
src/test/ui/type-mismatch.rs
0 → 100644
src/test/ui/type-mismatch.stderr
0 → 100644
想要评论请 注册 或 登录