about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-07 22:35:52 +0000
committerbors <bors@rust-lang.org>2023-06-07 22:35:52 +0000
commit2360f801432d3ecd8744164332b519e43f35fe96 (patch)
tree07b87a1030537b555b6022ccab922f487c9861e5 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff
parent7c34ec8947f00f316f66ce2ed7068a0395828833 (diff)
parent1cf95a9d50b0ca8be1687e03db4202cf033d4a74 (diff)
downloadrust-2360f801432d3ecd8744164332b519e43f35fe96.tar.gz
rust-2360f801432d3ecd8744164332b519e43f35fe96.zip
Auto merge of #10897 - y21:issue10887, r=Alexendoo
[`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
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions