Generation of CF3-containing epoxides and aziridines by visible-light-driven trifluoromethylation of allylic alcohols and amines.