I don't think that is a legal NX-OS command, but ti shouldn't hang the entire switch, or hang anything at all.
To put a port in port fast mode you have to device the port type in NX-OS. The equivlent command in NX-OS that you are trying to enter would be:
spanning-tree port type edge trunk