In a medium saucepan, melt butter over medium heat. Whisk in cocoa powder and milk until smooth.
Bring to a gentle boil, stirring constantly, and cook for 1 to 2 minutes.
Remove from heat and whisk in confectioners' sugar, vanilla, and salt until smooth and glossy. The frosting should be pourable but slightly thick. Add a splash of milk if needed.
As soon as the cake comes out of the oven, pour warm frosting evenly over the hot cake. Spread gently if needed.
Immediately sprinkle with toasted pecans, lightly pressing them into the frosting so they adhere.
Let the cake cool completely in the pan (about 1 to 2 hours). The frosting will set into a glossy, slightly crackly layer.