Silver-catalyzed [2,3]-rearrangement of halonium ylides derived from allyl and propargyl halides and alkyl diazoacetates.