Trashing Market Square and another card at the same time
The cards are trashed at the same time, so if you are trashing Market Square, you would not be allowed to discard Market Square for its effect also.


  You choose all the cards you want to trash, and then trash them at the same time; you don't trash them one-by-one. This matters for interactions with Dark Ages cards with on-trash abilities.


Dominion Strategy Wiki

Also, from the Dark Ages rulebook:


  When two or more cards are trashed at the same time, as with Count, first trash them all, then pick an order to resolve things that happen due to trashing them.