We consider a longitudinal expansion of a one-dimensional gas of hard-core bosons suddenly released from a trap. We show that the broken translational invariance in the initial state of the system is encoded in correlations between the bosonic occupation numbers in the momentum space. The correlations are protected by the integrability and exhibit no relaxation during the expansion.