You shall not eat any of their flesh [of unclean animals], and you shall not touch their carcasses; they are unclean to you.
Leviticus 11:8
Rashi believed that this command only applies to the priests, but the plain meaning of the text says otherwise. On the other hand, I think that "don't touch their carcasses" is an emphatic repetition of "don't eat them". In other words, "Don't eat them and don't even think about eating them." It's not a prohibition against burying your pet dog. In any case, it's an easy command to keep. If you need to dispose of the body of an unclean animal, use gloves and a shovel.