I had a player ask me whether the Sharpshooter feat (PHB, p. 170) works on spells, but I wasn't entirely sure. It says “ranged weapon attacks”, but I'm not sure if an eldritch blast cantrip counts as a ranged weapon attack.
Does the Sharpshooter feat work on ranged spells that require an attack roll, such as the eldritch blast spell?
I'm pretty sure it doesn't, given that the book also provides the Spell Sniper feat that indicates that it works on “ranged spell attacks” (PHB, p. 170), but I'd like to get a second or third opinion on it.
(I think the player was asking about it because they want the −5 attack / +10 damage that Sharpshooter offers, because Spell Sniper does not include that.)