As nouns,
swimming trunks is a hyponym of
swimming costume; that is, swimming trunks is a
word with a more specific, narrower meaning than
swimming costume:
swimming costume: tight fitting garment worn for swimming
swimming trunks: swimsuit worn by men while swimming