He left in a fast car and a filthy mood.
Here, the second "in" has been left out as the first "in" can serve both parts of the sentence (I assume), but what is this device called - if indeed, it has a name!
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.Sign up to join this community
What you have described is an example of a zeugma (pronounced ZOOG-ma).
A fairly standard (online) definition of this literary device is
a figure of speech in which a word applies to two others in different senses (e.g., John and his license expired last week ) or to two others of which it semantically suits only one (e.g., with weeping eyes and hearts ).
If you don't want to use a word whose English pronunciation sounds like a snack food popular in a country where you can't drink the water (zeugma), you can call it semantic syllepsis. One word or part of a sentence governs or modifies at least two other parts, but in completely different senses. The construction is grammatically correct, but semantically ambiguous, which is the source of amusement with this figure of speech.
She left in a huff, a hurry, and a Honda hatchback.