Associated types rollup

snapshot + rollup of #20390 and #20398