Auto merge of #78194 - bugadani:generic, r=varkor
Auto merge of #78194 - bugadani:generic, r=varkor

Skip most of `create_substs_for_ast_path` if type is not generic

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