Rapefic is a type of fanfiction where a prominent part of the story is rape of a character. This nearly always produces badfic, either by throwing the rapist OOC in order to make them commit the crime, throwing the victim OOC by making them suddenly unable to defend themselves, or simply by flying in the face of the canon's usual tone or content.
Even if a rapefic isn't bad in the badfic way, it's bad in the moral sense.