Rooney was a shadow of himself by 27-28. While he did score a decent amount of goals in the couple seasons after that it wasn't indicative of his overall play, which was really bad and detrimental to the team. He became slow, which exposed the fact his first touch became really poor, passes would bounce off him and he couldn't recover. He also became very risk adverse, pretty much every breaking attacking move we made was killed when the ball went to Rooney and he turned and passed backwards. He physically declined and that is what his game was based on. People will disagree with me, but SAF's parting gift to the team was to try and force Rooney out to try and force the club to move on from an aging player, in decline, whose value would have still been high to other clubs because they weren't as aware of his decline.
And it makes sense Rooney was done at that age, he started playing regularly at the age of 16, he was the heart of a successful United team for the following decade. Considering most players breakthrough in their early 20s then fade away in their early to mid 30s, it's the same scale with Rooney, just shifted to an earlier starting point.
Rashford could suffer a little from similar issues, he started playing regularly at 18, but let's be honest, there is no comparison between the players and the teams they played in. Rashford isn't fit to lace Rooney's boots and you could never question Rooney's commitment.