What happens when connecting two hot wires on same switch?
Nothing
Two hots of same circuit - nothing should happen.
Two hots of same leg but different circuits (i.e., 2 different fuses or breakers) - nothing should happen in most cases, but if you have GFCI protection either at the panel or upstream of at least one of the wires and any devices on (besides this nonfunctional switch) then the GFCI may detect that the hot (now coming from two different circuits) doesn't balance the neutral (on the circuit the GFCI is protecting) and trip. I'm not 100% certain of that, and I certainly wouldn't do such a thing deliberately (or any other mode of &quot;wire up the switch with two hots&quot;). This can also lead to imbalance between pairs of hot/neutral (even though the total of all hots == total of all neutrals) which is why this is something you should never do.
However:

Hot to neutral or hot to ground - short circuit which should blow fuse or trip breaker
Hots from two different legs - not sure but I wouldn't try it.