Rollup merge of #72008 - lcnr:patch-3, r=varkor
Rollup merge of #72008 - lcnr:patch-3, r=varkor

Add const-generics test

Taken from #71973 as this apparently already compiles.

r? @varkor

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