2360f80143
[`missing_fields_in_debug`]: don't ICE when self type is a generic param Fixes #10887 This PR fixes an ICE that happens when the implementor (self type) of a `Debug` impl is a generic parameter. The lint calls `TyCtxt::type_of` with that self type, which ICEs when called with generic parameters, so this just adds a quick check before getting there to ignore them. That can only happen inside of core itself (afaik) because the orphan rules forbid defining an impl such as `impl<T> Debug for T` outside of core, so I'm not sure how to add a test for this. It seems like this impl in particular caused this: https://doc.rust-lang.org/stable/std/fmt/trait.Debug.html#impl-Debug-for-F changelog: [`missing_fields_in_debug`]: don't ICE on blanket `Debug` impl in core |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |