The 20-year-old was attacked at the entrance to the Swanfield industrial estate, off Bonnington Road in the Leith area of Edinburgh, at about 4.30am on Saturday.
Police Scotland confirmed an arrest was made in the city this morning.
Officers said a 21-year-old man has been arrested and charged in connection with the incident.
He is expected to appear at Edinburgh Sheriff Court tomorrow.
A report is being sent to the procurator fiscal.