In the past we've seen feats that require ("The ability to cast at least one spell"), the War Caster feat (PHB, p.170), is an example of that.
I recently aquired the book "Bigby Presents: Glory of the Giants", and noticed it states "Spellcasting Feature" as a requirement for the "Rune Shaper" feat (page 18). Digging a bit deeper, I then saw this too in Tasha's, where we see it (among others) on the "Eldritch Adept" feat (page 79), which states as prerequisite "Spellcasting or Pact Magic feature". I suspect that the design goal here is to only allow this feat to be taken by "class-based" casters (Bard, Ranger, Eldritch Knight, etc..) instead of characters that happen to get an odd spell through a racial feature (eg. "Drow Magic"), another feat, etc.
However, I find it a bit odd that the Rune Shaper feat does not mention the Warlocks Pact Magic. RAW this probably means that the Warlock cannot take this feat*. Am I correct to think that?
*) Ignoring the fact that you can take the "Rune Carver" background to get this feat. It states that you get the Rune Shaper feat. I assume that when a background gives you a feat, any of the feat's prerequisites are waived in that case, right?