From what I have found, using Fling while holding a Rare Candy doesn't level up the Pokemon that has the Rare Candy flung at. If I find anything that says otherwise I will edit my answer.
EDIT:
Using Fling, Rare Candies do 30 damage. Since they do damage, they (probably) don't level up your Pokemon if a Rare Candy is flung at it.
Hope I helped!
Source