Nonequilibrium incorporation of impurities during rapid solidification