Rollup merge of #76783 - lzutao:rd_impl_kind, r=GuillaumeGomez
Rollup merge of #76783 - lzutao:rd_impl_kind, r=GuillaumeGomez

Only get ImplKind::Impl once

With this, the code panics in one place instead of two.

aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust