Slugs are one of the intermediate hosts of the rat lungworm, or Angiostrongylus cantonensis. Humans can get infected by the lungworm by eating slugs or snails. The CDC (Centers for Disease Control and Prevention) says that this happens only “under unusual circumstances” and that the infection generally causes only minor problems. It should be noted that the CDC is a United States organization, however. If you don’t live in North America, you should investigate the lungworm situation in your country. The parasite is more common in some parts of the world than in North America and might have different effects. In addition, some individuals may be more susceptible to its effects than others.
The CDC website gives a lot more information about the parasite. I’ve given a link to the site below. It would be a good idea to read the information on the site if you are concerned about the lungworm.