Add type parameter name to type mismatch error messages
Part of #47319. This just adds type parameter name to type mismatch error message, so e.g. the following: ``` expected enum `std::option::Option`, found type parameter ``` becomes ``` expected enum `std::option::Option`, found type parameter `T` ```
This commit is contained in:
parent
87cbf0a547
commit
6a30ce639f
@ -241,7 +241,7 @@ impl<'tcx> ty::TyS<'tcx> {
|
||||
ty::Infer(ty::FreshFloatTy(_)) => "fresh floating-point type".into(),
|
||||
ty::Projection(_) => "associated type".into(),
|
||||
ty::UnnormalizedProjection(_) => "non-normalized associated type".into(),
|
||||
ty::Param(_) => "type parameter".into(),
|
||||
ty::Param(p) => format!("type parameter `{}`", p).into(),
|
||||
ty::Opaque(..) => "opaque type".into(),
|
||||
ty::Error => "type error".into(),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user