The answer is both yes and no.
It would be illegal to lay someone off for the sole purpose of depriving them of vesting in a pension or other retirement plan, or to prevent someone from qualifying for benefits that they would otherwise be eligible for. Please note that someone who is just...