In the future, it's best to address such situations as soon as you notice the potential line cutter, rather than waiting until they cut. Once you notice a person who looks like they are waiting, direct them to the line.
This doesn't have to be accusatory: you can phrase it as if you are being helpful by pointing out the correct place to line up.
You: Excuse me, are you waiting?
You: Ah, we're queuing up over here. ("this is the line", etc., whatever sounds natural to you)
I've seen this strategy in action (occasionally directed at myself, when I went to an unfamiliar shop or office) and it was always received as a polite correction. Even if there is some grumbling about the lack of signage or how long the line is, this way frames the person in line as just a helpful messenger about correct protocol, so there is no reason to get angry at them.
This is better than waiting until he dashes to the desk, because:
He doesn't get his hopes up. In this case, the reaction could be stronger because he was standing there thinking the whole time that he would get served immediately and now has to wait, causing disappointment. Telling him earlier means less time he spends having the wrong expectations.
If it's a busy place, more people may have lined up behind you while he waited in the wrong spot, and now he has to wait longer than he would have if you'd just told him when he first came in. This would definitely annoy me, if I knew you'd seen me lining up in the wrong spot and didn't say anything, thereby causing me to have an even longer wait than if you had.
Finally, there are always a few irrational people who will get angry regardless, because they are frustrated by waiting and want a target to vent their frustration towards - but you can't prevent that, simply remain polite and do not escalate, like you did here by not responding.